solulubeta
Sign in
Recursion & Memo / DP patterns for coding tests
04.01 · Lesson

Which DP Is It? A Pattern Map

Most test DP questions are one of six shapes. How to spot each one from the question, what its state is, and what its recurrence looks like.

9 min 1 video Quiz Pro

You know the method: recursion → memo → table. The last skill is speed: seeing the state quickly. Most DP questions in tests are one of six shapes.

Is it DP at all?

The question saysIt means
“how many ways”DP, combine with +
“minimum / maximum / longest”DP, combine with Math.min / Math.max
“is it possible”DP, combine with ||
“print / list all”usually backtracking, not DP
n is 100 to 10,000too big for 2ⁿ, fine for n × something: DP
solulu Pro

Continue this lesson with Pro

Inside: 3 sections · 1 video · quiz.

  • Is it DP at all?
  • The six shapes
  • How to practise this chapter
Lifetime ₹1,999 ₹999 · Launch offer
Mark this as done when you are finished.

Item 27 of 44 · updated 2026-10-13