classSolution{publicbooleancanFinish(int numCourses,int[][] prerequisites){// Part 1: initint[] in =newint[numCourses];List<List<Integer>> out =newArrayList<>();for(int i =0; i < numCourses; i++){out.add(newArrayList<>());}// Part 2: 出入度维护for(int i =0; i < prerequisites.length; i++){in[prerequisites[i][0]]++;out.get(prerequisites[i][1]).add(prerequisites[i][0]);}// Part 3: 课程清除Deque<Integer> queue =newArrayDeque<>();for(int i =0; i < in.length; i++){if(in[i]==0){queue.offer(i);numCourses--;}}while(!queue.isEmpty()){int pre = queue.poll();for(int temp : out.get(pre)){if(--in[temp]==0){numCourses--;queue.offer(temp);}}}return numCourses ==0;}}
ANDRITZ to supply gasification plant and biomass handling line to Klabin’s Puma II project in Brazil.国际技术集团公司安德里茨收到KLabin的订单,为其位于巴西的Ortigueira浆厂提供一台完整的生物质气化炉和一条新的生物质处理线。International technology…