InterviewLegend

More Dynamic Programming

Alex Chen42 min readUpdated 250 real interview reports

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.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Hard
  3. 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.

Had your D. E. Shaw interview?Tell us what they asked. Reviewed before it goes in, never with your name.
D. E. Shaw interview guide

Know what D. E. Shaw asks before you walk in.

32 coding · 3 system design · 16 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.