GATE Computer ScienceVery hardGATE CSE · NIELIT

Top-down merge sort (split at ⌊n/2⌋, standard merge that stops comparing once one list is exhausted) sorts [38, 27, 43, 3, 9, 82, 10, 15, 71, 6, 50]. How many key comparisons are made in total?

  1. A. 24
  2. B. 27
  3. C. 29
  4. D. 32

Correct answer: B. 27

Summing the comparisons over each merge in the recursion tree gives 27.

More Algorithms questions

Exams that ask this topic