📐 Topological Sort — Kahn's Algorithm (BFS) Full Demo
Topological Sort O(V+E) Step 0/9
📊 Directed Acyclic Graph (DAG), node number = in-degree
🗂 Data Structures
Queue (nodes with in-degree 0)
Topological Order
In-degree inDeg[]
Time: O(V+E)
Space: O(V)
💻 Code
HintClick Next Step ▶ to start and observe how Kahn's algorithm builds the topological order by processing nodes with in-degree 0.
0/9

Keyboard: Next   Prev   R Reset