← Questions
Course schedule: finish every course and find an order
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You have n courses and a list of prerequisite pairs.
- Decide whether every course can be completed. This fails exactly when the prerequisites contain a cycle.
- Return one valid order to take all the courses, or an empty result when there is none.
It is also asked as resolving package dependencies, where a cycle must be reported.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
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
