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.
- 1 problem, worked step by step
- 1 diagram
- about 26 min
Premium lessonD. E. Shaw interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
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.