Observations

Basically a depth-first search of the graph.

Also related to a post-order traversal of the appropriately defined depth-first tree.

Can also define the topological sort in terms of a breadth-first traversal. This is actually nicer if you want to output all possible topological sorts.


next up previous
Next: Correctness Up: TOPOLOGICAL SORT Previous: Algorithm