Of the following sort algorithms, which has execution time that is least…
2020
Of the following sort algorithms, which has execution time that is least dependent on initial ordering of the input ?
- A.
Insertion sort
- B.
Quick sort
- C.
Merge sort
- D.
Selection sort
Attempted by 302 students.
Show answer & explanation
Correct answer: C
Merge Sort consistently runs in O(n log n) time regardless of input order. Other algorithms like Quick Sort or Insertion Sort may degrade to O(n^2) based on initial data arrangement. Thus, Merge Sort is the least dependent on input ordering.