Red-Black Trees
Overview:
A Red-Black tree is a type of binary search tree where each node is given a color, red or black.
Here is a link to more information: Red-Black Trees: Geeks for Geeks
Here is an image:
Rules:
- Nodes are either red or black
- Root/leaf/null nodes are always black
- If a node is red, then its 2 children must be black
- The # of black nodes from the root to a null node must be the same for all paths
Key Algorithms:
- Insert
- Rotate
- Remove