In a Red-Black tree, what color must the root always be?
Show answer
Black
This is one of the five essential Red-Black tree properties. If an operation turns the root red, it is immediately recolored black to maintain the tree's balance constraints.
Black
This is one of the five essential Red-Black tree properties. If an operation turns the root red, it is immediately recolored black to maintain the tree's balance constraints.
Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.
Turn on Algorithms practice →