Topological Sort with Kahn's Algorithm
Order tasks that depend on others.
What Topological Order Is
A topological order lists every node of a directed graph so each edge points from earlier to later. Think tasks before the tasks that need them.
Only DAGs Allowed
This works only on a DAG, a directed acyclic graph. If a cycle exists, no valid order can ever satisfy every dependency.
All lessons in this course
- Topological Sort with Kahn's Algorithm
- Detect Cycles in Directed Graphs
- Strongly Connected Components
- Bridges & Articulation Points