Topological Sort (Kahn's BFS)

Find ordering in a DAG using in-degree + queue. LC 207, 210, 269.

Waiting
In queue (in-degree 0)
Processing
Ordered

Controls

Time: O(V+E) | Space: O(V+E)

Order