39C. Summary

Binary search trees, as described in Chapter 38 and Section 39A, are not efficient. They can degenerate into linked lists. We need a scheme to keep them balanced.

Height-balancing is one approach to doing that. The height of a node is the length of the longest path from that node to a leaf, counting the start and end nodes. The height of an empty tree is defined to be 0. A tree is height-balanced if, for every node v, the heights of the left and right subtrees of v differ by no more than 1.

The next chapter shows how to keep a binary search tree height-balanced.