Possible Duplicate:
Fastest strategy to form and sort an array of positive integers
What would be the fastest way to get a sorted array from an unsorted iterable of integers ? Currently I do it by iterating over the iterable n no of times (where n is size of list) each time getting the highest from iterable & putting it in array. But I'm looking to clean this up & let some good library do it for me.
Probably I won't mind using any popular libraries like Guava, etc for this purpose.