Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Recognizing SCC Problems

โญโญโญ advancedโณ 35 min read๐Ÿ“ Lesson 151 of 281

Mutual reachability, propagating swaps, 'same group' sizes, and digraph DP that back edges break โ€” the four signatures of SCC.

The four signatures

  1. "u reaches v AND v reaches u" โ€” mutual reachability IS the SCC relation.
  2. Bidirectional swaps that propagate: swap(i,j) and swap(j,k) allowed โ†’ one component {i, j, k}.
  3. "Group" answers โ€” SCC sizes.
  4. DP on a digraph where back edges break the state โ€” condense first.

Anti-signature: a DAG needs no SCC pass; undirected connectivity is not SCC territory.

โšก Now practice

Ready to Code
SCC TrioCount and size components, count distinct condensation edges, and label components โ€” with an undirected misread, a dedupe miss, and an O(nยทm) near-miss.
3 challenges ยท ยท ~110 min