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