Kosaraju's algorithm to compute strongly connected components