Algorithm fo finding the strongly connected components of a graph.