ISRO Scientist/Engineer CSE 2020Algorithms › Sorting
ISRO Scientist/Engineer CSE 2020 PYQ: Of the following sort algorithms, which has execution time that is least dependant on initial ordering of…
Of the following sort algorithms, which has execution time that is least dependant on initial ordering of the input?
- AInsertion sort
- BQuick sort
- CMerge sortCorrect answer
- DSelection sort
Answer
(C) Merge sort
Approach
Identify which sorting algorithm's running time is invariant (non-adaptive) with respect to the initial arrangement of the input. Compare best, average, and worst-case complexities of each option.
Reviewed by ISRO IQ Editorial Team.