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
Write the steps involved in the insertion and deletion of an element in the stack.
Which sorting is stable?
What is the height of binary tree?
What is linked hash set?
Why do we use data structures?
Can arraylist store primitives?
Define biconnectivity?
Can sets contain duplicates?
What is minimum depth of binary tree?
What is space complexity of a program?
What is difference between hashmap and hashset?
How do you clear a stack?
Can we sort hashmap?
What is weight balanced tree in data structure?
What is a list in data structure?