Amazon.com Interview Question
1,578 Interview Reviews |
Back to all Amazon.com Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Engineer at Amazon.com:
Was given a set of fields. Was asked to figure out the best data structure to store this data in the form of a list and at any given point, retrieve the first 5 (decreasing order) of field values.
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
Helpful Answer?
Yes |
No
Inappropriate?
To comment on this
question,
Sign In with Facebook or
Sign Up



0 of 0 people found this helpful
by Anonymous:
loop, if current value to insert greater than the header value or if list size less than 5, insert the currrent value, if list size > 5 remove header value. At the end return the list values in reverse order.