Insertion/Deletion in Red-Black Tree
According the property of Red-Black tree, no two Red node come together (as Parent-Child relation). So if it happens then we have to reordering the tree either by recoloring or by rotation. Note: Here NULL will considered as Black node If the uncle of the conflicting child is red: Apply Recoloring: If G is root node then change it to black, also check if parent of G is red, if yes apply reordering recursively If the uncle of the conflicting child is Black: Apply Rotation: Zig-Zig Rotation: This is similar to LL/RR rotation: Zig-Zag Rotation: This is similar to LR/RL rotation: Let us create a tree by using the following nodes: 10, 20, 30, 50, 40, ...