Concurrency Clash - data race and deadlock practice
About Concurrency Clash
A five-level code review of freshly generated concurrent C++ snippets: flag the exact line that carries the defect, then pick the fix worth shipping.
The game is a code review, deliberately read-only - nothing here compiles or runs C++, because the interview skill being tested is reading concurrent code and saying precisely what is wrong with it. Each case is generated fresh from a template pool and comes with a short production premise and a numbered code listing. Every case compiles, passes review, and works on a laptop; it fails under load, on the wrong interleaving, or on the wrong architecture.
Each case has two stages. First, find the line: click the line number you believe carries the defect and flag it. The game reveals the true bug line, names the bug, and explains it. Second, pick the fix: from a set of candidate fixes, shuffled so the correct one never sits in a fixed slot, choose the one that addresses the defect without paying for more than it needs - more than one candidate may remove the symptom.
Difficulty runs five levels: data races (and why volatile is not the answer), condition variables (spurious wakeups, check-then-act), memory ordering (release/acquire publishing), deadlock (lock ordering, lost wakeups), and subtle bugs (hidden ordering, ABA, red herrings). Clearing a case - right line and right fix - advances you a level; missing it deals a new case at the same level, never a repeat of the one you just saw. Miss twice in a row above level 1 and the game eases you down one level to rebuild ground. Clearing level 5 ends the review with a summary.
Why quant interviews test this
Quant dev interviews at trading firms lean heavily on read-this-concurrent-code-and-find-the-bug questions, because production trading systems are aggressively multithreaded and a candidate who cannot spot a check-then-act gap on a whiteboard will not spot it in a matching engine. The two-part format here - name the line, then name the right fix - is exactly the interview's shape.
The fix-selection half is the differentiator. Many candidates can point at a race once told one exists; far fewer can argue why the minimal fix is sufficient and why the sledgehammer is a cost. That argument is what separates a senior answer from a memorized one.
The Concurrency Clash guide covers how scoring works, the strategy that wins, a worked example and the mistakes most players make.
More Quant Dev games
- The Order Book Engine - Implement a price-time-priority limit order book in the browser, pass an 11-check matching script, then beat a latency gate built around O(1) cancels.
- All Quant Dev practice
- Every game guide