Design Concurrent Structures
Three threads, one rule: whatever order the scheduler starts them in, the output has to read first, then second, then third. That prompt, the print-in-order problem, is the smallest honest test of the thing D. E. Shaw keeps returning to on its low-level design and coding rounds. Coordinate threads that share state so the result is correct no matter how they interleave. There is almost nothing to draw. The whole difficulty is that the scheduler can suspend any thread between any two instructions, and your code has to be right anyway.
The round draws three related shapes, and this lesson builds all three. Ordered execution, where threads must fire in a fixed sequence rather than a scheduler-decided one. A thread-safe bounded structure, where many threads read and write one container without tearing it. And a data structure built from scratch to a named complexity, most often an LFU cache with O(1) get and put. The first two are concurrency correctness, reasoned in words and static code because thread scheduling never runs the same way twice. The third is the constant-time design instinct that the min-stack and the insert-delete-getRandom prompts already probe, turned up a level.
D. E. ShawPremium lesson · System design round
The D. E. Shaw design, worked end to end.
- The design, drawn outSystem design · 1 diagram
$49 a year · all 100 companies · cancel anytime
From 250 D. E. Shaw reports, forum threads behind logins and write-ups in Chinese.
D. E. Shaw interview guideKnow what D. E. Shaw asks before you walk in.
10 coding · 3 system design · 16 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.