Heaps and Data Structure Design
A design problem at D. E. Shaw tells you which calls the class must support and how fast each one has to run. The code tends to be short. Most of the thinking goes into picking two structures that cover each other's weak spots, then keeping them in sync when one changes. A delete or an eviction is where they usually drift apart, so trace one on paper first.
State the cost of every call before you code. The panel often asks for it per operation, and for an amortized cost it wants the reason. If one call is O(log n) and the rest are O(1), say which one and why.
Heaps come up in the same rounds. A heap keeps the top value ready without sorting the rest, and a pair of heaps can watch more than one end at once. Expect questions on the containers themselves too. Interviewers here ask what a hash map costs when keys collide, and why an ordered map is a tree.
D. E. ShawPremium lesson · Coding round
The 5 D. E. Shaw problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the D. E. Shaw questions$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.
32 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.