VerbalKint's blog

By VerbalKint, history, 5 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it