You are not logged in. Please login at to post your questions!


Strongly connected component!

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:- Whats wrong in the code?

asked 21 May '14, 17:57

v_akshay's gravatar image

accept rate: 13%

edited 21 May '14, 17:58

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


answered 31 Oct '15, 07:12

dim131's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 21 May '14, 17:57

question was seen: 3,236 times

last updated: 31 Oct '15, 07:12