Red-Black Tree
About
It is a self-balancing Binary Search Tree with specific coloring rules to maintain balance.
Usually for most cases Red-Black Trees are preferred over AVL Trees.
Color Rules
The root node is always Black.
By default every new node in the Tree will be Red. Then it wil be checked to see if it can keep being Red or if it will be changed to Black.
A Red node can only have Black parents and children.
Balance Rules
Searching an element
Inserting an element
Deleting an element
Last updated