Java Reference
In-Depth Information
A
2
C
0
1
B
0 or
1
B
A
0 or 1
h
T4
C
1, 0 or 1
h
h
h
h
h
T1
T2
T3
T4
T1
T2 and T3 may have
different heights, but
at least one has
height of h .
h
h
T2
T3
(a)
(b)
F IGURE 26.4
An LR rotation fixes an LR imbalance.
0
A
2
C
1
B
0 or
1
A
B
0 or 1
h
T1
0,
1, or 1
C
h
h
h
h
h
T1
T2
T3
T4
T4
T2 and T3 may have
different heights, but
at least one
has height of h .
h
h
T2
T3
(a)
(b)
F IGURE 26.5
An RL rotation fixes an RL imbalance.
60
60
55
100
55
100
45
67
107
45
67
107
87
87
105
187
(a)
(b)
F IGURE 26.6
A balance factor determines whether a node is balanced.
 
 
Search WWH ::




Custom Search