This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingOne DFS records finishing times, the reversed graph's DFS in that order reveals the components.
What this asks
Find strongly connected components with two traversals.
A first DFS records finishing times; a DFS on the reversed graph in that order peels the components.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing