GATE DA 2024 · Selection Sort

MCQ · 2 marks · Problem PROG-SORT-0013

Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii) Selection sort Which ONE among the following choices of sorting algorithms sorts the numbers in the array \([4,3,2,1,5]\) in increasing order after exactly two passes over the array?
  1. A
    (i) only
  2. B
    (iii) only
  3. C
    (i) and (iii) only
  4. D
    (ii) and (iii) only

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

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/422927/gate-ds%26ai-2024-question-35

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