SLIDE 1
1
Theory I Algorithm Design and Analysis
(4 – AVL trees: deletion)
- Prof. Th. Ottmann
Theory I Algorithm Design and Analysis (4 AVL trees: deletion) - - PowerPoint PPT Presentation
Theory I Algorithm Design and Analysis (4 AVL trees: deletion) Prof. Th. Ottmann 1 Definition of AVL trees Definition: A binary search tree is called AVL tree or height-balanced tree, if for each node v the height of the right subtree h ( T
1
2
3
4
5
6
7
8
9
10
11
12
φp
p φp
13
φp p φp 1
p
14
φp q +1 p
15
u p w 2 h + 1 3 h + 1 v +1 h - 1 1 h – 1 φp +1 u v 3 h + 1 w q h – 1 1 h – 1 p 2 h + 1
16
u p w 2 h 3 h + 1 v 0 h - 1 1 h – 1 3 h + 1 φp +1 u v w q h – 1 1 h – 1 p 2 h 1
17
u p z 2 3 v 0 h - 1 1 h – 1 w 0 4 h r φp +1 u v w q h – 1 1 h – 1 p 2
z 3 4 h
18