Module topo

Module topo 

Source
Expand description

Topological sort: DFS finish-order and Kahn’s algorithm.

Functions§

topological_sort_dfs
Returns a topological ordering of the nodes using DFS finish order.
topological_sort_kahn
Returns a topological ordering using Kahn’s algorithm (in-degree BFS).