Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. canFinish(1, [[1,0]]) // true - to take course 1 you should have finished course 0
  2. canFinish(2, [[1,0],[0,1]]) // false - to take course 1 you have to have finished course 0, to take 0 you have to have finished course 1
  3. canFinish(1, []) // true
  4. canFinish(3, [[1,0],[2,0]]) // true
  5. canFinish(3, [[2,0],[2,1]] ) // true
  6. canFinish(10, [[5,6],[0,2],[1,7],[5,9],[1,8],[3,4],[0,6],[0,7],[0,3],[8,9]]) // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement