AlgoBazaAlgoBaza
Back to algorithms

Post-order List

The post-order list algorithm records vertices in the order they are completed by DFS — each vertex is added to the list AFTER processing ALL its neighbors (at function exit).

Sredni
O(V+E)O(V)OIJOI
Select programming language
Choose the language to see the post-order list implementation.
Select example
Small, Medium, and Large show recursion code generation. Very large shows only the call stack.

Post-order List (Python): Small graph (5 vertices, DAG)

1/0
1.0x