Question 114Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

Which of the following satisfies the property of the red-black tree?

  1. ABlack, if the new node is a root node
  2. BRed, if the new node is not a root node
  3. CBlack, if the new node is not a root node
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (D) More than one of the above

Explanation

In a red-black tree the root is black and a newly inserted non-root node is coloured red, so both A and B hold (more than one).

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 114 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. 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.