Representations of Trees
Many different representations of trees are possible:
- Binary tree: contents and left and right links.
- First-child/next-sibling: contents, first-child, next sibling.
- Linked list: the first element contains the contents,
the rest are a linked list of children.
- Implicit: a node may contain only the contents; the children
can be generated from the contents or from the location of the parent.