A list is ordered from smaller to largest when a sort is
called. Which sort would take the longest time to execute?
Answer Posted / ntrphanikumar
I am not sure about the answer.
But I think the answer is "Selection Sort" whose order is
O(n^2) irrespective of the elements order.
I guess all other sorts somehow depend on the order of elements.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What is the difference between array list and vector list?
What are the properties of binary heap?
Is hashset a collection?
Give the example of validating the parenthesis of expression using stack.
What is a postfix expression?
How do you search for a target key in a linked list?
Is hashtable fail fast?
Can we change the size of an array at run time?
Write a program using mergesort technique.
Can we make hashmap synchronized?
Define double hashing?
Explain different methods in which you can traverse a tree?
Which is better hashmap or hashtable?
What is mergesort and hashtable?
Can you override methods of arraylist?