5 questions to test your understanding
Which pair of red-black properties together directly guarantees that tree height is O(log n)?
A team is choosing between an AVL tree and a red-black tree for a container that undergoes frequent insertions and deletions with occasional lookups. Which is the better choice and why?
A new node is always inserted as red in a red-black tree because inserting it as black would immediately violate the black-height invariant.
Red-black trees are more strictly balanced than AVL trees, so their height is typically shorter for the same number of nodes.
Why does fixing a red-black violation after insertion require at most two rotations, regardless of tree size?