Strongly Connected Components

Data Structures & Algorithms · Advanced Graphs · Master · 25 min

Split a directed graph into groups where everyone can reach everyone (Kosaraju or Tarjan, both O(V + E)), then shrink each group to a dot to get a DAG.

This lesson is part of TuringPath Pro. See plans.

What you will learn

  • What "strongly connected" means
  • Kosaraju: two DFS passes
  • Tarjan: one DFS with low-links
  • The condensation DAG

More in Advanced Graphs

Previous: 0-1 BFS & Multi-Source BFS · Next: Bridges & Articulation Points