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 does sorting an array do?
Which is better bubble sort or selection sort?
Differentiate between comparable and comparator.
How do you implement a stack?
Which interfaces are implemented by hashmap?
How many types of lists are there?
Can a binary tree be empty?
What is circular queue in data structure?
What does simulation of queues mean?
What is data type and its types?
Mention the advantages of representing stacks using linked lists than arrays?
How to reference all the elements in a one-dimension array?
What is the purpose of sorting algorithms?
What is bubble sort?
Will it create any problem if we add elements with key as user defined object into the treemap?