If I have 1000 objects and my requirement is to sort them
quickly, then which collection would you recommend and why?
Answer Posted / muni sankar
Heapsort is one of the best general-purpose sorting
algorithms, a comparison sort and part of the selection sort
family. Although somewhat slower in practice on most
machines than a good implementation of quicksort, it has the
advantages of worst-case O(n log n) runtime and being an
in-place algorithm
Is This Answer Correct ? | 0 Yes | 8 No |
Post New Answer View All Answers
What is autoboxing and unboxing?
Are arrays primitive data types?
What is a hashmap used for?
What does mean in regex?
What will be the initial value of an object reference which is defined as an instance variable?
Can we serialize static variables in java?
Differentiate between vector and array list.
What is the difference between dom and sax parser in java?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is busy spin, and why should you use it?
How java is similar to c?
How do you create a sop?
Is java a super set of javascript?
Can you pass functions in java?
Difference between a process and a program?