UGC NET Paper 2 (Computer Science)Hard

The information-theoretic lower bound on the number of comparisons needed to sort 5 distinct elements is:

  1. A. 7
  2. B. 8
  3. C. 5
  4. D. 10

Correct answer: A. 7

ceil(log2 5!) = ceil(log2 120) = 7, the decision tree needs at least 120 leaves.

More UGC NET Computer Science and Applications questions

Exams that ask this topic