SCCs

Правка en1, от Jim_Moriarty_, 2020-05-10 07:58:19

Can two strongly connected components overlap ?

I read somewhere that they can't.

But at the same time I encountered a problem https://www.hackerearth.com/practice/algorithms/graphs/strongly-connected-components/tutorial/

problem is at the bottom of the page Consider the example testcase given - 5 6

1 4

1 3

2 4

3 4

4 5

5 1

I found manually that there are two SCCs -(1, 3, 4, 5) and (2) So the answer should be zero. But it's given as -3. So am I not understanding something about SCC or the answer given is wrong? Please help.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Jim_Moriarty_ 2020-05-10 07:58:19 571 Initial revision (published)