Strongly connected component!

graph
graphs
kosaraju
scc

#1

I have written the code for kosaraju’s algorithm for finding the scc, Its giving wrong answer for this graph:-
alt text

here’s the code:- http://ideone.com/3uxMdo
Whats wrong in the code?


#2

Although, it is quite a long time after you asked. The mistake is that on line 59 it should have been !used[order*] instead !used* (since you do not want to check whether the index was used, but rather the node).