Hard data structure and algorithm practice puzzle.
Given a list where deps[i] names the services that must be running before service i can start, return a valid start order, or an empty list when the dependencies contradict each other. Break ties by lowest id so the answer is reproducible, which matters more than it sounds: a boot order that varies run to run turns a dependency bug into one that only appears on some machines. This is what systemd computes at every boot, and what every build system computes for every build.
Solve it three ways: snap the jigsaw pieces together, fill in the blanks, or type it from scratch against the tests. This one is free.
Browse all 536 puzzles