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
Give a good data structure for having n queues ( n not fixed) in a finite memory segment. You can have some data-structure separate for each queue. Try to use at least 90% of the memory space.
Does map extend iterable?
List out the advantages of using a linked list?
Is arraylist a list?
How do we search a specific element in an array?
Define internal nodes?
What do u mean by array?
What is top in stack?
What are the applications of stack?
Which is better arraylist or linkedlist?
What is selection in an algorithm?
List the abstract operations in the set?
What is the logic to reverse the array?
Explain the uses of binary tree.
What is difference between arraylist and linkedlist?