Hard

Strongly Connected Components

A strong component is a set of vertices where every one can reach every other along directed edges. Kosaraju runs two depth-first searches. Tarjan finds the same sets in one.

Costs

CategoryAlgorithm
DifficultyHard
Time, adjacency listO(V + E)
Kosarajutwo DFS passes
Tarjanone DFS pass

Questions

What is Strongly Connected Components?

A strong component is a set of vertices where every one can reach every other along directed edges. Kosaraju runs two depth-first searches. Tarjan finds the same sets in one.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.