# Course Schedule II
Given `num_courses` and a list of `[course, prerequisite]` pairs, return *a* valid order to take all courses, or an empty list if it's impossible (a cycle exists).
Mock 4's Course Schedule only asks feasibility (True/False, via Kahn's algorithm); this extends it to actually producing the order — the harder half of the same algorithm taught in Module 1's Dijkstra/Topological Sort lesson.
**Note for graders:** multiple valid orderings can exist for a given input — pick a fixed test graph with a unique valid order (e.g. a simple chain of prerequisites) to keep this auto-gradable with a single expected answer.
Target complexity: O(V + E).