Tarjan SCC
Push on entry, lower low-links through open vertices, pop a whole component when low[u] == disc[u].
Bridges and Components: Tarjan on two cycles
6 finishes with low[6] = disc[6] = 6: nothing below it reaches an earlier open vertex, so 6 is the root of a component. Pop the stack down to 6: component 1 is {6}.
Cost
- Best
- O(V + E)
- Average
- O(V + E)
- Worst
- O(V + E)
- Space
- O(V)
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
Bridges and Components covers these too, in the same run.