US Interview Question for Software Engineers


Team: Amazon Prime
Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

I believe he wanted to test the speed of solving some certain tasks that doesn't really need code, it can be simply solved using awk from linux :)

- alexalghisi March 24, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I don't think that would work, since lexicographical ordering is not the same as numerical. For example, is some product has sold 8 it's going to be ranked higher than the one which sold 98

- Anonymous March 26, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Case 1) a product is given. Find the highest sale quantity and date

Ans: Traverse the file and create a heap(Max/Min) for each product. Heap may be in the array format. Each array is put as a value in a HashMap and key is the Product id. So the HashMap holds the values as Heap array and key as product id.

Case 2) A Date is given. Find the highest sold product and quantity.

Ans. Same. Only difference is that the Date will be the key for the HashMap.

- s100banerjee March 29, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More