Overview
Kosaraju's Algorithm orders nodes by finish time, reverses the graph, and then collects strongly connected components.
Finds strongly connected components using two passes of depth-first search.
Compact metadata for implementation and discovery.
Kosaraju's Algorithm orders nodes by finish time, reverses the graph, and then collects strongly connected components.
Quick facts
Runtime and memory behavior at a glance.
Best
O(V + E)
Average
O(V + E)
Worst
O(V + E)
Space
O(V)
Show finish order from the first pass and component discovery in the reversed graph.
Kosaraju's Algorithm operates in O(V + E) time and O(V) space within the Strong Components family. Often compared with Tarjan's Strongly Connected Components and Depth-First Search.
What each reference supports for this entry.
Textbook support for Kosaraju's Algorithm's standard algorithm design, invariants, and complexity analysis.
Open sourceAlgorithm catalog support for Kosaraju's Algorithm's problem context, known alternatives, and practical selection tradeoffs.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Kosaraju's Algorithm uses DFS passes on the graph and its transpose.
Both compute strongly connected components.