leetcode 1136.Parallel Courses
1.BFS
가장 간단하게 위상정렬과 BFS를 사용한 솔루션인데 한 학기에 들을 수 있는 과목의 수가 무제한이므로 queue size에 대해 모두 순회해야 한다. 2.BFS(cycle check+longest path) The number of semesters needed is equal to the length of the longest path
in the graph. stackoverflow 발생 둘을 합친 one-pass 솔루션(dfs로 사이클체크하면서 동시에 최대길이 갱신)