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 difference between tree and binary tree?
What is bubble sort algorithm?
Is hashtable fail fast?
Explain merge sort algorithms.
What does bubble sort do?
Is data structures and algorithms important?
Which type of memory allocation is referred for linked list?
What are the two types of data?
Why entry interface is used in map?
Can we put null value in hashmap?
Where is insertion sort used?
What do you mean by external sorting?
Why hashmap is faster than hashset?
What do you know about the big-o notation and can you give some examples with respect to different data structures?
What is the difference between hashmap and arraylist?