Skip to content
All tags

#strongly-connected-components

1 posts

Stanford CS161 Lecture 10: Why Two DFS Passes Find Strongly Connected Components

Contracting each SCC always produces a DAG; first-pass DFS finish times order those components, and a second pass on the transposed orientation discovers exactly one SCC per DFS tree in O(n+m).