Module Build Order
Medium · Module Build Order
A project has `n` modules numbered from 0 to `n - 1`. The list `deps` describes how they depend on each other: a pair `[a, b]` means module `a` uses module `b`, so `b` has to be built before `a`. Modules are built one at a time. Decide whether there is an order in which all `n` modules can be built without breaking any dependency. Return `True` if such an order exists and `False` otherwise.…
Solve the problem →