Question 136Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

Which of the following statement(s) is/are correct about red-black binary tree?

Which of the following statement(s) is/are correct about red-black binary tree? I. Every node is either red or black. II. Every leaf node is red. III. When a node is red and both its children are black.
  1. AI and II
  2. BI, II and III
  3. CI and III
  4. DIII and II
Show answerHide answer

Correct answer: (C) I and III

Explanation

In a red-black tree every node is red or black, and a red node's children must be black. Leaves (NIL nodes) are black, not red, so II is false.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 136 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. 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.