Each node gets a color.
- White nodes haven't been dealt with yet.
- Black nodes have been completely dealt with.
- Gray nodes are in progress.
Flow:
- Make all nodes white.
- Pick a node u to ``visit'' and make it gray.
- Pick a child of u to visit.
- Continue until we run out of white kids.
- Add the last visited node to a list and backtrack.
Next: Algorithm
Up: TOPOLOGICAL SORT
Previous: Data Structures and Notation