Q. In a Red-Black tree, what happens when a red node is inserted as a child of another red node?
A.
The tree remains valid.
B.
The tree is immediately balanced.
C.
A recoloring and rotation may be needed.
D.
The insertion is not allowed.
Solution
When a red node is inserted as a child of another red node, a recoloring and possibly a rotation are needed to maintain the properties of the Red-Black tree.
Correct Answer:
C
— A recoloring and rotation may be needed.