|
(Recall that the color of the new node N is always red)
|
We will next discuss how to adjust the resulting tree to restore all the properties of the Red-Black tree for each of the above cases
(Please convince yourself that these are all the possible cases)
|
|
And we are done !!!
Notice also that:
|
|
So we are done !!!
|
|
|
However:
|
Therefore, we can use recursion (i.e.: re-coloring) on the node G to fix the potential violation at node G in the Red-Black tree !!!
|
|
|
|
|