Red-Black Trees

What are they?

A Red-Black Tree is a special variant of a binary search tree (BST) that is self-balancing. It has rules about "coloring" each node (either red or black) to ensure that the tree stays balanced, which keeps search times as O(log n).

Diagram of a red-black tree

Key Properties

To learn more, check out the RBT listing on this Wikipedia page.