InterviewLegend

Dynamic Programming

Alex Chen22 min readUpdated 1,074 real interview reports

Dynamic programming is a real but contained band of LinkedIn's coding surface. It is not a DP-heavy shop the way some trading and infra teams are, where a hard table problem is the whole round. Here DP is a handful of recurring names inside the reused tagged set. The same ones keep coming back: three Premium questions and its circular sequel, two Premium questions II, the occasional Word Break or Coin Change. Two Premium questions sit near the top of that DP cluster, both recurring in well over half the LinkedIn loops that surface DP at all. Learn this short list cold and you have covered most of what LinkedIn draws.

DP earns a careful pass even though the slice is small, for one LinkedIn-specific reason. On the phone screen, candidates report you write complete code in CoderPad and nobody runs it, so you trace your own examples by hand instead. DP is the pattern least forgiving of that. A recurrence can read fine on the screen and still be off by one in the base case, or pull the answer from the wrong variable, with no Run button to catch it. So the bar is deriving the recurrence and then proving it by hand, walking an input through the table until it returns the right number before anyone compiles a thing.

The LinkedIn angle
Dry-run a DP by hand. That is how the phone screen grades it. Write the recurrence, then narrate a small input through the table cell by cell, saying what each value means as you fill it. The interviewer is watching whether you can verify your own code without executing it. A candidate who derives a clean recurrence but cannot trace it back to the answer leaves a weaker signal than one who walks every cell and catches their own seed bug live. Build the habit of stating the base case out loud and pointing at the cell that holds the final answer.
What's inside
  • 3 problems, worked step by step
  • about 22 min

Premium lessonLinkedIn 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

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

Know what LinkedIn asks before you walk in.

16 coding · 5 system design · 26 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.