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

Mention some interfaces implemented by linked list in java.

545


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

557


What are sets in java?

509


How to change the priority of thread or how to set priority of thread?

568


What is the use of callablestatement?

580






What are different types of references?

536


What is meant by tab pans?

652


Is main an identifier?

548


How many bits is a word?

571


What is locale in java?

579


What are the two ways to create a thread?

538


What is the purpose of the strictfp keyword?

611


In which language java is written?

542


How many wrapper classes are there in java?

538


If goto and const is reserve words than why it is not work in java?

1510