Exercise 13.2-2

Argue that in every \(n\)-node binary search tree, there are exactly \(n - 1\) possible rotations

For each node in a binary search tree we can call LEFT-ROTATE on it if it has a right child and RIGHT-ROTATE if it has a left child. In effect, each rotate call requires some pair of nodes that have a parent-child relationship. A binary search tree with \(n\) nodes has \(n - 1\) such relationships because the root has no parent and thus there are \(n-1\) possible rotations within such a tree.