 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
AVL
trees actually maintains the height close to
|
|
|
minimum
by monitoring the shape of the tree as
|
|
|
|
you
insert and delete
|
|
|
| |
After
you insert/delete
|
|
|
|
|
the
tree is checked to see if any node differs by more
|
|
|
|
than
1 in height
|
|
|
|
|
if it
does, you rearrange the nodes to restore balance
|
|
|
|
|
But,
as you can guess, we cant arbitrarily rearrange
|
|
|
|
nodes....we
must keep proper order
|
|