Contents
Page-10
Prev
Next
Page+10
Index
Representations of Trees
Many different representations of trees are possible:
- Binary tree: contents and left and right links.
- arithmetic expressions
- cons as a binary tree node, with first and rest
treated equally as binary 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.