SPOJ — BREAK

Revision en1, by VerbalKint, 2019-04-23 19:38:00

I was solving this problem: https://www.spoj.com/problems/BREAK/ I figured that for a DAG, we can solve it by using indegree vector and simple dfs. Going though some online editorials, I noticed that there was mention of Strongly Connected Components. Can anyone tell me the intuition behind using SCC in this question. Any help is appreciated. Thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English VerbalKint 2019-04-23 19:38:00 366 Initial revision (published)