All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · 22 June 2026

In the worst case, the smallest number of comparisons required by any sorting algorithm, which does only binary comparisons, is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. ⌈log n!⌉

Explanation

A comparison-based sort must be able to distinguish between all n! possible orderings of the input, and each binary comparison can split the remaining possibilities by at most a factor of 2. This information-theoretic argument requires a decision tree of depth at least log₂(n!), so the worst case requires at least ⌈log₂(n!)⌉ comparisons — the well-known lower bound that algorithms like merge sort asymptotically achieve. Hence the correct answer is ⌈log n!⌉.

More Data Structures and Algorithms questions