Build Order for a Service and Its Dependencies
Asked at Uber · Coding Questions · Difficulty: Medium · Last asked Dec 1, 2025
A build system knows which services depend on which. To build one target service you must first build everything it depends on, directly or indirectly, and each service may be built only after all of its own dependencies. Write a function that returns a build order for one target, or reports that no order exists because the dependencies form a cycle.
Loading the problem…