ISRO 2015 · Heap Sort & Non-Comparison Sorts

MCQ · 1 mark · Problem PROG-SORT-0030

If one uses straight two-way merge sort algorithm to sort the following elements in ascending order: 20, 47, 15, 8, 9, 4, 40, 30, 12, 17 then the order of these elements after second pass of the algorithm is:
  1. A
    8, 9, 15, 20, 47, 4, 12, 17, 30, 40
  2. B
    8, 15, 20, 47, 4, 9, 30, 40, 12, 17
  3. C
    15, 20, 47, 4, 8, 9, 12, 30, 40, 17
  4. D
    4, 8, 9, 15, 20, 47, 12, 17, 30, 40

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/1467/gate1999-1-14-isro2015-42

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