Problem 210 · Medium

Course Schedule II

Run Kahn's topological sort to build a valid course ordering, or return [] when a cycle blocks completion.

Open the interactive visualisation