Computer Science EngineeringHard

A red-black tree with n internal nodes has height at most

  1. A. n/2
  2. B. log2 n
  3. C. sqrt(n)
  4. D. 2 log2(n+1)

Correct answer: D. 2 log2(n+1)

The black-height argument bounds the height by 2 log2(n+1).

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic