tarjan algorithm for getting strongly connected components of directed graph