Returns a list of strongly connected components in G.
Uses Tarjan’s algorithm with Nuutila’s modifications. Nonrecursive version of algorithm.
References:
R. Tarjan (1972). Depth-first search and linear graph algorithms. SIAM Journal of Computing 1(2):146-160.
E. Nuutila and E. Soisalon-Soinen (1994). On finding the strongly connected components in a directed graph. Information Processing Letters 49(1): 9-14.