|
|
@ -93,15 +93,48 @@ where 6 subcases could be distinguished. |
|
|
Wikipedia says we begin with replacing B(3) which one if its childs, in my |
|
|
Wikipedia says we begin with replacing B(3) which one if its childs, in my |
|
|
case this means, setting r(8)->left to NULL.... |
|
|
case this means, setting r(8)->left to NULL.... |
|
|
|
|
|
|
|
|
|
|
|
B(11) |
|
|
|
|
|
|
|
|
|
|
|
R(8) R(13) |
|
|
|
|
|
|
|
|
|
|
|
B(N) B(9) B(12) B(16) |
|
|
|
|
|
|
|
|
|
|
|
B(N) R(10) B(N) B(N) B(N) B(N) |
|
|
|
|
|
|
|
|
|
|
|
B(N) B(N) |
|
|
|
|
|
|
|
|
So, what is called in on Wikipedia is simply a nullpointer for me...hopefully |
|
|
So, what is called in on Wikipedia is simply a nullpointer for me...hopefully |
|
|
I don't have to do anything with it. |
|
|
I don't have to do anything with it. |
|
|
|
|
|
|
|
|
Get an overview over our variables now: |
|
|
Get an overview over our variables now: |
|
|
|
|
|
|
|
|
N : Nullpointer set in R(8)->left |
|
|
|
|
|
|
|
|
N : Nullpointer set in R(8)->left (thus N will be black by definition, ever) |
|
|
P : R(8) |
|
|
P : R(8) |
|
|
S : B(9) |
|
|
S : B(9) |
|
|
Sl: Nullpointer |
|
|
Sl: Nullpointer |
|
|
Sr: R(10) |
|
|
Sr: R(10) |
|
|
|
|
|
|
|
|
|
|
|
we have case 2 described in Wikipedia (reverse colors of P and S) |
|
|
|
|
|
|
|
|
|
|
|
B(11) |
|
|
|
|
|
|
|
|
|
|
|
R(8) R(13) |
|
|
|
|
|
|
|
|
|
|
|
B(N) B(9) B(12) B(16) |
|
|
|
|
|
|
|
|
|
|
|
B(N) R(10) B(N) B(N) B(N) B(N) |
|
|
|
|
|
|
|
|
|
|
|
B(N) B(N) |
|
|
|
|
|
|
|
|
|
|
|
still case 2 rotate left on P |
|
|
|
|
|
|
|
|
|
|
|
B(11) |
|
|
|
|
|
|
|
|
|
|
|
B(9) R(13) |
|
|
|
|
|
|
|
|
|
|
|
B(8) R(10) B(12) B(16) |
|
|
|
|
|
|
|
|
|
|
|
B(N) B(N) B(N) B(N) B(N) B(N) B(N) B(N) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# vim: set et ts=4: |
|
|
# vim: set et ts=4: |