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
How to sort an array from smallest to largest java?
Give me some null interfaces in java?
Can we have return statement in finally clause? What will happen?
What are the types of casting?
What is the difference between static method and instance method in Java?
How to use string tokenizer class.
How do you find the maximum number from an array without comparing and sorting?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
What is a void method java?
What a static class can contains?
What is a pattern what is an anti pattern?
How to run a JAR file through command prompt?
What is meant by main method?
What is a double?
What are the two types of java programming?