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
Are arrays primitive data types?
What is the benefit of singleton pattern?
what is object slice?
What is an immutable object?
Can an interface be defined inside a class?
What is busy spin, and why should you use it?
What is a parameter in a function?
why java does not support unsigned keyword?
How do you reverse a word in java?
Explain the scope or life time of class variables or static variables?
What is a prefix function.write down a code to compute prefix function.
Add a value x to array from index l to r where 0 <= l <= r <= n-1
How do you check if a string contains only numeric digits?
What is the argument in java?
How do we access static members in java?