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 are the advantages of functions?
What happens to the Exception object after handling an exception?
What is append in java?
What is a variable in java?
What are the advantages and disadvantages of reference counting in garbage collection?
What is the difference between access specifiers and access modifiers in java? 16
Why for each loop is used?
What are recursive functions?
What is a double vs float?
Write a program to find the greatest of three numbers in java?
What is nested interface?
Can we create a class inside a class in java?
explain autoboxing in java?
what do you mean by stream pipelining in java 8? Explain
Can we write class inside a class in java?