Find the strongly connected components in a graph