A list is ordered from smaller to largest when a sort is
called. Which sort would take the longest time to execute?
Answer Posted / uma sankar pradhan
selection sort,quick sort,bubble sort
(all will take the same time and its time complexity is of
the order of n^2)
the time complexity for insertion sort when the list is
ordered from smaller to larger is O(n)
the time complexity for merge sort irrespective of the
order of the elements is O(nlogn)
| Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
How many types of sorting algorithms are there?
Define hashing?
what is the difference between dynamic as well as non - dynamic data structures.
What is a static structure?
Which is faster arraylist or linked list?
What is a bubble sort and how do you perform it?
What is quick sort?
Tell me what is quick sort?
What are three common types of traversals?
Do you know what is linear search?
Explain the common uses of tree database.
What do you mean by probing?
What is an ordered map?
Difference between calloc and malloc ?
If you are using c language to implement the heterogeneous linked list, explain what pointer type will you use?