Documente Academic
Documente Profesional
Documente Cultură
v
6
binary search tree 1 2 1
32 50 88
3 8 such that for every
z 1 1
4 internal node v of T, 48 62
the heights of the
children of v can
differ by at most 1. An example of an AVL tree where the
heights are shown next to the nodes:
n(2) 3
4 n(1)
Restructuring Restructuring
(as Single Rotations) (as Double Rotations)
Single Rotations: double rotations:
32 50 78 50 78 44 78
w 17 62 b=y
48 54 88 48 54 88 17 50 88
50 78 c=x
48 54
48 54 88
before deletion of 32 after deletion
AVL Trees 11