Amazon Interview Question

Sorting a list of some random type

Interview Answers

Anonymous

Mar 21, 2009

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

Anonymous

Aug 15, 2009

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