Topological Sort
Order the vertices of a directed acyclic graph so every edge goes forward.
Intermediate
Kahn's algorithm (repeatedly remove zero in-degree nodes) or DFS finish order. Used for build systems, course prerequisites and task scheduling.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.