![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bfs
文章平均质量分 82
nicaishibiantai
这个作者很懒,什么都没留下…
展开
-
Course Schedule
There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as原创 2015-05-11 13:12:18 · 604 阅读 · 0 评论 -
Course schedule II
和course schedule一样的要求,只是要求输出toplogicl排序的结果。一个tricky的地方就是如果没有正常结果,输出new int[0public class Solution { public int[] findOrder(int numCourses, int[][] prerequisites) { int[] result = new int原创 2015-05-18 06:13:47 · 511 阅读 · 0 评论