CS241: Spring 2010 --Binary trees and Binary Search Trees
- Binary trees
- Metaphors (mixed): family tree, vegetable
- Terminology (even more mixed): root, leaf, sibling, parent, child, subtree, ancestor, descendant, interior node, level, depth (of a node), height (of a tree), traversal
- Formal Recursive Definition (suitable for memorization) - a binary tree is either empty, or it has a root and two subtrees, right and left (each is a binary tree). According to this definition every leaf is an empty tree! Be aware of the difference between formal use of the definition and casual description -- the latter is used for talking/thinking about binary trees, the former for writing code.
-