STRONGLY-CONNECTED-COMPONENTS(G)
- Call DFS(G) to compute u.f for each vertex u
- Compute GT
- Call DFS(GT) but select edges by decreasing values of u.f computed in the previous DFS algorithm.
- Output the vertices of each tree in the depth first forest formed in the last DFS search as strongly connected components.