Leetcode 210. Course Schedule II
Given numCourses and prerequisite pairs, return any ordering of courses that satisfies all prerequisites or an empty array if impossible — this is essentially computing a topological sort of a directed graph and detecting cycles.
Asked at:
Meta
Doordash
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid October, 2025
Meta
Senior
Late September, 2025
Meta
Senior
Late July, 2025
Amazon
Mid-level
Your account is free and you can post anonymously if you choose.