Kosaraju's algorithm finds strongly connected components with two plain searches. Pass 1 runs DFS on the graph and records the order in which vertices finish. Then every edge is reversed. Pass 2 starts a DFS from the unassigned vertex that finished last. Whatever it reaches in the reversed graph is exactly one component, because a vertex that finished later than everything it can reach is in a source component of the condensation.
Kosaraju's SCC over 7 vertices.
Pass 1, enter 0. Unseen neighbours: 1.
Pass 1, enter 0.
Pass 1, enter 1. Unseen neighbours: 2.
Pass 1, enter 1.
Pass 1, enter 2. Unseen neighbours: 3.
Pass 1, enter 2.
Pass 1, enter 3. Unseen neighbours: 4.
Pass 1, enter 3.
Pass 1, enter 4. Unseen neighbours: 5, 6.
Pass 1, enter 4.
Pass 1, enter 5. Every neighbour is seen, so 5 finishes now.
Pass 1, enter 5.
5 finishes, number 1. The badge is its finish time. Pass 2 will take vertices from the highest down.
5 finished, number 1.
Pass 1, enter 6. Every neighbour is seen, so 6 finishes now.
Pass 1, enter 6.
6 finishes, number 2. The badge is its finish time. Pass 2 will take vertices from the highest down.
6 finished, number 2.
4 finishes, number 3. The badge is its finish time. Pass 2 will take vertices from the highest down.
4 finished, number 3.
3 finishes, number 4. The badge is its finish time. Pass 2 will take vertices from the highest down.
3 finished, number 4.
2 finishes, number 5. The badge is its finish time. Pass 2 will take vertices from the highest down.
2 finished, number 5.
1 finishes, number 6. The badge is its finish time. Pass 2 will take vertices from the highest down.
1 finished, number 6.
0 finishes, number 7. The badge is its finish time. Pass 2 will take vertices from the highest down.
0 finished, number 7.
Finish order: 5, 6, 4, 3, 2, 1, 0. Now reverse every edge. Strong connectivity does not change when all edges flip, since a cycle read backwards is still a cycle, but a DFS can no longer leak out of a source component into the ones it used to reach.
All edges reversed.
Pass 2: the unassigned vertex with the latest finish time is 0, finish 7. Start a DFS there on the reversed graph. It opens component 0.
Start pass 2 from 0.
Pass 2, reach 2 along a reversed edge: it joins component 0.
2 joins component 0.
Pass 2, reach 1 along a reversed edge: it joins component 0.
1 joins component 0.
The search from 0 is exhausted: component 0 is {0, 1, 2}. In the reversed graph nothing else is reachable from it without crossing into a component that was already assigned.
Component 0: 0, 1, 2.
Pass 2: the unassigned vertex with the latest finish time is 3, finish 4. Start a DFS there on the reversed graph. It opens component 1.
Start pass 2 from 3.
Pass 2, reach 5 along a reversed edge: it joins component 1.
5 joins component 1.
Pass 2, reach 4 along a reversed edge: it joins component 1.
4 joins component 1.
The search from 3 is exhausted: component 1 is {3, 4, 5}. In the reversed graph nothing else is reachable from it without crossing into a component that was already assigned.
Component 1: 3, 4, 5.
Pass 2: the unassigned vertex with the latest finish time is 6, finish 2. Start a DFS there on the reversed graph. It opens component 2.
Start pass 2 from 6.
The search from 6 is exhausted: component 2 is {6}. In the reversed graph nothing else is reachable from it without crossing into a component that was already assigned.
Component 2: 6.
3 strongly connected components, coloured by membership. Two searches and one edge reversal, O(V + E), and the components appear in topological order of the condensed graph, the opposite of Tarjan's.
3 components.