04.01 · Lesson
Which DP Is It? A Pattern Map
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 says | It 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,000 | too 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
Item 27 of 44 · updated 2026-10-13