InterviewLegend

Dynamic Programming

Alex Chen30 min readUpdated 27 real interview reports

Snap onsites reportedly carry at least one dynamic-programming question, and candidates name DP as the round they wish they had drilled harder. The problems themselves are not exotic. They come from the same medium-centered bank as everyone else: a Premium question, the buy-low-sell-high family, a Premium question, Climbing Stairs, the grid walks like a Premium question and Unique Paths. There is no Snap-only DP trick to memorize. The pressure is the format around it.

That format is a live HackerRank editor over Google Meet, where the code runs against cases and pseudocode does not pass. So a DP answer here is graded twice: once on whether the recurrence is right, and once on whether you got a working table executing quickly and then cleaned it up. Every one of these problems yields to the same four-step recipe. Name the state, write the recurrence, pin the base cases, fill in dependency order. Get those four on the page and the code is almost mechanical.

What's inside
  • 3 problems, worked step by step
  • about 30 min

Premium lessonSnap 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 Snap interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Snap interview guide

Know what Snap asks before you walk in.

19 coding · 5 system design · 15 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.