More Dynamic Programming
DP, Graphs & Subarrays worked one knapsack, and the four problems here add more from the family D. E. Shaw uses most on its coding test. Two of them run the table over a string or a grid. The other two hide the DP. One is a knapsack in disguise, and one keeps two running values where you'd expect one.
Interviewers here often hear out a recursive answer first, then ask for the table and the order you fill it in. Know the direction before you start. One grid here fills backward from the goal, and that choice decides whether it works at all.
Three of these have a shortcut that passes the first example and fails later, such as a greedy match that misses a better choice further on. So say the recurrence in one line before any code. Name what one cell means and which cell holds the answer, then fill the table.
D. E. ShawPremium lesson · Coding round
The 4 D. E. Shaw problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Hard
- A Premium questionCoding · Hard
+ 1 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.