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
Is there any difference between int[] a and int a[]?
Why hashmap is faster than hashset?
What are the classification of data structures?
Does arraylist guarantee insertion order?
Differentiate between iterator and listiterator.
What is variable size arrays?and why we use it?
Describe full binary tree and complete binary tree.
Should I use hashmap or hashtable?
What's the difference between a hashtable and a hashmap?
Does treeset allow null?
What is binary search tree and explain its time complexity?
Is hashtable better than dictionary?
What are the advantages of linked list over an array?
Explain the most efficient method to reverse a linked list?
Define in brief an array.