Topological Sort
TraversalMediumLinear dependency ordering for DAGs using Kahn's in-degree queue algorithm.
Alt+Shift+T
Configuration Panel
Ensure edges are directed (check "Directed" inside canvas controls) to model a dependency DAG, then run.
Complexity Mappings
Time ComplexityO(V + E)
Space ComplexityO(V) in-degree tracking array
Interactive SVG Graph Canvas
🖱️ Middle-drag to Pan🎡 Scroll wheel to Zoom⌨️ Shift-drag snap to 20px grid
Inspector Panel
Select a vertex or edge to inspect details.
Graph Wizard
Conceptual Overview
Topological Sort orders the vertices of a Directed Acyclic Graph (DAG) linearly such that for every directed edge u -> v, vertex u comes before v in the ordering.
Algorithm Mechanism
Kahn's algorithm tracks in-degrees for all vertices, pushing zero-in-degree nodes into a queue. Popped vertices are appended to the sort, and adjacent in-degrees are decremented.
Source: CP-Algorithms reference guide