[Leetcode] Course Schedule
The condition of question leads to Cycle detection for directed graph. DFS would help.
Description
There are a total of numCourses
courses you have to take, labeled from 0
to numCourses - 1
. You are given an array prerequisites
…