 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Notice
how different this is than tree traversal.
|
|
|
|
– |
with
tree traversal, we always visit all of the nodes
|
|
|
|
in the
tree
|
|
|
|
– |
with
graph traversal we do not necessarily visit all
|
|
|
|
of
the vertices in the graph unless the graph is
|
|
|
|
connected.
|
|
|
|
– |
If a
graph is not connected, then a graph traversal
|
|
|
|
that
begins at a vertex will only visit a subset of the
|
|
|
graphs
vertices.
|
|