207. Course Schedule

public class Solution {
    public boolean canFinish(int numCourses, int[][] prerequisites) {
        int[] indegree = new int[numCourses];
        Queue queue = new LinkedList();
        for(int[] pair:prerequisites){
            indegree[pair[1]]++;
        }
        for(int i=0;i

你可能感兴趣的:(207. Course Schedule)