Red-Black Trees in Java
A Red-Black Tree is a self-balancing binary search tree data structure.
Here are key properties of a Red-Black Tree:
- Each node is either red or black.
- The root node is always black.
- No red nodes have red children.
- All paths from the root to a null child have the same number of black nodes (black height of the tree).
- All null children are black.
Here's a link to learn more about Red-Black Trees
Here is a picture of a Red-Black Tree: