Course schedule: can every course be finished?

0
Remix

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.

MetaTechnical phone screenLast asked Dec 2025
No answer yet. Write the first one; the best answer gets endorsed.