← Questions

Course schedule: can every course be finished?

0
MetaCodingLast asked Dec 2025

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.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding