 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
With
AVL trees
|
|
|
|
– |
each
node must now keep track of the “balance
|
|
factors”
which records the differences between
|
|
|
the
heights of the left and right subtrees
|
|
|
|
– |
the
balance factor is the height of the right
|
|
|
subtree
minus the height of the left subtree
|
|
|
|
– |
all
balance factors must be +1, 0, or -1
|
|
|
|
– |
notice,
this does meet the definition we learned
|
|
about
for a balanced tree
|
|