If one uses a straight two-way merge sort algorithm to sort the following…

PYQ GATE 1999

If one uses a 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 the 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

Attempted by 355 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…