210. Course Schedule II
in Coding Interview on Interview, Graph, DFS
Course Schedule
과목별 선수과목 리스트를 만든다. This problem is equivalent to finding the topological order in a directed graph. If a cycle exists, no topological ordering exists and therefore it will be impossible to take all courses.