← 返回 google 的题目列表Modified Course Schedule
类型:online_judge
Given the number of courses numCourses and a list of prerequisite pairs prerequisites, where prerequisites[i] = [a_i, b_i] indicates that to take course a_i you must first complete course b_i. Write a function to determine if it is possible to finish all courses. In addition to the normal conditions, handle an unspecified additional variant condition encountered in the interview. Provide complete input and output descriptions.
Example
Input
numCourses = 2, prerequisites = [[1, 0]]