Review: Inorder Tree Walk
An inorder walk prints the set in sorted order:
TreeWalk(x)
TreeWalk(left[x]);
print(x);
TreeWalk(right[x]);
- Easy to show by induction on the BST property
- Preorder tree walk: print root, then left, then right
- Postorder tree walk: print left, then right, then root