Professional Documents
Culture Documents
AVL Tree
AVL Tree
balance factor =
height of left subtree -
bf = he -
hr = 2 1,- 0
,
13 .
1bf) = /he -
hr1 < .
1
, , , , , ,
i2 + ↓7 +t
( + +, + ) 2
i 2 is
1 - 1 ->
-
-1
,
t
2
20
7 I 7 I y 1
O O O
D
+t
2 2 2 +t 5
O
16
if
>
(
(--it) +)
-
+ +, >
~
-
I 5
,
I 5 2 7
q
--
I
3 q +
3 1 3 ⑥
+
3
6
5 5 5
in
19 >
-
>
L if L
7 if
2
I · I
B G 3 G ·
I 3 G ·
g 4 g
·
Delete
t =
< [C1) 2] 3 [(7293) 10(11)]} Delete 2, 1, 7 in order
.
O
④
+ t
3 3 7
D2
-g
D1
⑩
·
7 + +, -
=>
-
B 10
,
2 I 10-
10 /
9 If
I 7
# 11 7.
.
G g g
B7
3 10
,
11