canFinish = function(numCourses, prerequisites) {
    const { graph, path } = buildGraph(numCourses, prerequisites);

    return hasPath(numCourses, graph, path);
}
https://leetcode.com/problems/course-schedule/
Time O((V)^2 + E) | Space O(V + E)
@param {number} numCourses
@param {number[][]} prerequisites
@return {boolean}