37C. Summary

There are six standard traversal orders: preorder (root first), postorder (root last) and inorder (root in between the subtrees), plus the reversals of those.

Destructive functions on trees change the item, left subtree or right subtree of an existing node. A simple example is a function that leaves the subtrees the same but changes the items, such as a function that replaces each item x by x3.

Sometime a destructive function needs to be careful not to cut the branch out from under itself, especially when it recycles a node to the heap manager.