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


Please Help Members By Posting Answers For Below Questions

What is autoboxing and unboxing?

583


Are arrays primitive data types?

638


What is a hashmap used for?

648


What does  mean in regex?

571


What will be the initial value of an object reference which is defined as an instance variable?

639






Can we serialize static variables in java?

655


Differentiate between vector and array list.

638


What is the difference between dom and sax parser in java?

532


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

8623


What is busy spin, and why should you use it?

590


How java is similar to c?

586


How do you create a sop?

529


Is java a super set of javascript?

587


Can you pass functions in java?

568


Difference between a process and a program?

615