Dynamic Programming (memoization)
ProUse when you have overlapping subproblems that can be cached to avoid redundant work.
Keywords for identifying Dynamic Programming Problems
→ “Min / max / count number of ways”
→ “Best / optimal”
→ “How many ways …”
→ “Can you reach / can you form …”
→ “Subproblem / overlapping subproblems”
→ “Choose / take or skip”
→ “Partition / split”
→ “Longest / shortest” (often DP)
→ “Sequence / array with decisions at each index”
Unlock the Dynamic Programming (memoization) template
Get the full code template and worked LeetCode examples for Dynamic Programming (memoization) — plus every other pattern in the library — with a one-time $29 lifetime upgrade.
Upgrade to ProSee free Binary Search template →