Hard data structure and algorithm practice puzzle.
Given a wait-for graph as an adjacency list, where an edge from A to B means A is waiting on B, return true if the system is deadlocked. A deadlock is a cycle. Count each process's incoming edges, then keep removing processes with none, lowering their neighbors' counts as you go. If any process is left over, it's stuck in a cycle.
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.
Every line of the solution comes with a note explaining why it is there, and a step by step replay shows the code running. At level 3, where you type it yourself, you can ask for an AI mock interview on this problem that ends with a hiring manager's scorecard.
Browse all 546 puzzles