aryagraph.algorithms.traversal.dfs_postorder#

aryagraph.algorithms.traversal.dfs_postorder(g: Graph, source: Hashable | None = None, *, depth_limit: int | None = None) → list[Hashable][source]#

Nodes in depth-first postorder (a node after all its descendants).

On a DAG, the reversed postorder is a topological order. With depth_limit, nodes cut off at the limit are still listed (networkx’s dfs_postorder_nodes drops them, although its preorder keeps them).