Skip to content
ı
Workspace
Visualizer
Search anything…
⌘ K
Desk
Path
Problems
Review
More
Library
/
Topological Sort (Kahn's)
graphs
Best
O(V + E)
Avg
O(V + E)
Worst
O(V + E)
Space
O(V)
Preparing Topological Sort (Kahn's)...
Orders vertices of a DAG linearly using in-degrees and a queue of zero-indegree candidate nodes.