Ways to traverse a graph:

  1. Pre-order
  2. In-order
  3. Post-order
  4. Reverse post-order (RPO) – if there is a path from A to B, A appears before B

RPO of a DAG is also called topological sort. It is undefined in case if there is a cycle. Then a graph can be partitioned in Strongly Connected Components (SCC).