There are numCourses courses labeled 0 to numCourses - 1. You are given a list prerequisites where each entry [course, prereq] means you must finish prereq before course.
Return true if it is possible to finish every course, otherwise false.
This is possible exactly when the prerequisite graph has no cycle.
2, [[1,0]]2, [[1,0],[0,1]]3, []4, [[1,0],[2,1],[3,2]]3, [[0,1],[1,2],[2,0]]5, [[1,0],[2,0],[3,1],[3,2],[4,3]]1, []