Why it matters

Tarjan's is elegant single-pass SCC. Foundation of many graph algorithms.

Advertisement

The architecture

DFS with index + low-link.

Push to stack on discovery.

Pop SCC when root found.

Tarjan's SCC algorithmDFSindex + low-linkStackpush on discoveryPop SCCwhen root foundTarjan 1972; single DFS pass; O(V+E) time; elegant
Tarjan's SCC algorithm.
Advertisement

How it works end to end

Tarjan 1972.

Single DFS pass.

Low-link identifies roots.