Representing/Implementing
Trees as Lists
l
Every tree can be represented as a
list.
l
Obvious:
l
Tree is a special kind of directed graph.
l
Every directed graph can be represented
as a list of pairs.
l
But we want a representation that
makes it
clear
that we have a tree.