Search⌘ K

DIY: Course Schedule II

Explore how to implement an algorithm that returns a valid course order based on prerequisites. Understand the problem of scheduling courses to meet prerequisite requirements, and practice coding a solution that can be applied in operating system and interview contexts.

Problem statement

There is a total of n courses labeled from 0 to n - 1. Some courses may have prerequisites. For example, if prerequisites[i] = [ai, ...