next up previous contents index Search
Next: 0.4.2.1 Depth-first traversal Up: 0.4 Graph Algorithms Previous: 0.4.1 Graph Representation

   
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.



 
Scott Gasch
1999-07-09