Red Black Trees
What is a Red Black Tree?
Red Black Trees are self-balancing binary search trees that ensure O(log n) efficiency for search, insertion, and deletion
Properties of Red-Black Trees
- Every node is either red or black.
- The root has to be black
- Red nodes can't have red children or red parents
- All paths from a node to a leaf must pass through the same number of black nodes
Example Diagram
Learn More
Learn more about Red Black Trees here.