GATE CS 2021 · Set-1 · Heap Sort & Non-Comparison Sorts

MCQ · 1 mark · Problem PROG-SORT-0019

Consider the following array.\[\begin{array}{|l|l|l|l|l|l|l|l|} \hline 23&32&45&69&72&73&89&97 \\ \hline\end{array}\]Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?
  1. A
    Selection sort
  2. B
    Mergesort
  3. C
    Insertion sort
  4. D
    Quicksort using the last element as pivot

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/357443/gate-cse-2021-set-1-question-9

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com