Course schedule: can every course be finished?
Given a number of courses and prerequisite pairs, return whether it is possible to finish every course, which means the prerequisite graph has no cycle. Use Kahn's algorithm or DFS with colours.
No answer yet. Write the first one; the best answer gets endorsed.
