Search⌘ K

DIY: Course Schedule II

Understand how to find a valid course order when given course prerequisites. Learn to implement a function that returns an order to complete all courses, applying problem-solving skills useful for coding interviews involving dependency resolution and scheduling.

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, ...