0.4.2 Graph Traversal
Given a starting point it is possible to systematically
traverse an entire graph (directed or not) visiting every node
reachable from the starting point. This can be accomplished
in many ways but by far the most common two are
breadth-first traversal and depth-first
traversal. Because trees are really just
restricted graphs, these two traversals can and are used on
trees (binary or otherwise) as well.
|