Java Interview Questions

6,585,195 interview questions shared by candidates

business sense: There are two types of cars A and B. The number of people in US who use A and B are the same. They drive the same distances each month. Now there are two new technologies, X and Y (of equal cost). If apply X, mpg of A would increase from 50 mpg to 75 mpg; If apply Y, mpg of B would increase from 10 mpg to 11 mpg. The goal is to decrease the dependence on foreign oil, or to decrease the consumption of gasoline. Question: which technology would you apply? Follow up question: after applying the technology of your choice, assume there's money available for research on new technology, which car would you choose to conduct research on?
avatar

Data Scientist

Interviewed at Meta

3.4
Jan 7, 2015

business sense: There are two types of cars A and B. The number of people in US who use A and B are the same. They drive the same distances each month. Now there are two new technologies, X and Y (of equal cost). If apply X, mpg of A would increase from 50 mpg to 75 mpg; If apply Y, mpg of B would increase from 10 mpg to 11 mpg. The goal is to decrease the dependence on foreign oil, or to decrease the consumption of gasoline. Question: which technology would you apply? Follow up question: after applying the technology of your choice, assume there's money available for research on new technology, which car would you choose to conduct research on?

My 30 min coding question was related to tree where all nodes were managers each node has a value which was the number of months they worked.We have to find the maximum tenure which is I remember can be calculated using the average of its child nodes.
avatar

Software Development Engineer

Interviewed at Amazon

3.5
Jan 25, 2017

My 30 min coding question was related to tree where all nodes were managers each node has a value which was the number of months they worked.We have to find the maximum tenure which is I remember can be calculated using the average of its child nodes.

In python code, given a json object with nested objects, write a function that flattens all the objects to a single key value dictionary. Do not use the lib that actually performs this function. { a:{b:c,d:e} } becomes {a_b:c, a_d:e} ( not, a:"b:c,d:e" }
avatar

Data Engineer

Interviewed at Amazon

3.5
Apr 29, 2020

In python code, given a json object with nested objects, write a function that flattens all the objects to a single key value dictionary. Do not use the lib that actually performs this function. { a:{b:c,d:e} } becomes {a_b:c, a_d:e} ( not, a:"b:c,d:e" }

Viewing 3281 - 3290 interview questions

Glassdoor has 6,585,195 interview questions. Prepare for your interview. Get hired. Love your job.