Amazon interview question

Sorting a list of some random type

Interview Answers

Anonymous

21 Mar 2009

Don't use brute force. At the very least offer some comments that shows you are thinking of more efficient solutions.

Anonymous

15 Aug 2009

Insert the items into a TreeSet (assumes the elements are comparable). Iterate through the loaded set.