Implementation of the Kosaraju's algorithm for computing strongly connected components of a directed graph