Glossary: Algorithms Beyond the Basics in Rust
Kahn's algorithm
Also written: Kahn
A way to produce a topological order: put tasks with in-degree 0 in a queue, take them one by one, and lower the in-degree of what follows. If the order comes out short, there is a cycle.