|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
If a
node is a root, the level is 1. If a node is not
|
|
|
the
root,
|
|
|
|
– |
then
it has a level 1 greater than its parent.
|
|
|
| • |
If
the tree is entirely empty,
|
|
|
|
– |
then
it has a height of zero.
|
|
|
| • |
Otherwise,
its height is equal to the maximum
|
|
|
level
of its nodes.
|
|
|
| • |
Using
this definition,
|
|
|
|
– |
the
trees shown previously have the height of 3, 5, and
|
|
5.
|
|
|
|