A list is ordered from smaller to largest when a sort is
called. Which sort would take the shortest time to execute?
Answer Posted / sourav naskar
quick sort cant be the answer as this methods works best
when the list is completely unsorted.In this the method
would have worked best if it is descendingly sorted.As it
is completely sorted the answer is insertion sort which
takes O(n).
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
What is difference between list and array?
What is heap tree?
Which is better selection or bubble sort?
Can arraylist have duplicates?
What is heap and its types?
Why do we use arrays?
What are the Advantages and disadvantages of Array?
Why is data structure used?
What is queue example?
Define splay tree?
What is a queue in data structure?
Differentiate stack from array?
When would you use a hashmap?
How does quick sort work?