A list is ordered from smaller to largest when a sort is
called. Which sort would take the longest time to execute?
Answer Posted / rahul
When the elements are ordered in either Ascending or Descending order, Quick sort behaves Equivalent to Merge sort. Time complexity of O(nlogn) is taken for sorting.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Which sorting is used in collections sort?
What is harvesting in agriculture?
For addition and deletion. Which one is most preferred: array list or linked list?
What is difference between for loop and foreach?
Will hashmap allow null keys?
By Which algorithm, the 8 queens problem is solved?
What is difference between hashmap and hashtable?
Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?
What is the difference between hashmap and arraylist?
What is the time complexity of arrays sort?
What is immutablelist?
What are the 3 types of measurement?
What are control structures?
Can hashmap have same key?
How do you initialize an arraylist?