Question 73Asked in DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1

What is the at most height of red-black tree with n internal node?

  1. An
  2. Blog₂n
  3. C2log₂(n + 1)
  4. Dlog₂(2n + 1)
Show answerHide answer

Correct answer: (C) 2log₂(n + 1)

Explanation

A red-black tree with n internal nodes has height at most 2log₂(n + 1), since the black height is at least half the height.

From DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1

This is question 73 of DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.