Hello,
I am having problems with this problem ;(
Follow my implementation, I'm using kosaraju, I believe I'm right but you're escaping some test case.
Code: http://ideone.com/ifMknd
Hello,
I am having problems with this problem ;(
Follow my implementation, I'm using kosaraju, I believe I'm right but you're escaping some test case.
Code: http://ideone.com/ifMknd
Try this input:
1
5 6
1 2
2 1
4 5
5 4
3 5
5 2
expected output : 1
your output : 2