What is a Red-Black Tree?
They are self-balancing Binary Search Trees
Some rules that Red-Black Trees follow:
- Each node is either red or black
- The root node is always black
- No red nodes have red children
- Every path from the root to a null child has the same number of black nodes
- Null children are black
Inserting and Deleting
Below are the diagrams that detail the insersion and deletion
Note that for deletion, these diagrams only take effect when there is no red replacement node when deleting a black node
INSERSION
DELETION
LINK TO MORE INFO :D