How it works
Memoization vs tabulation
Top-down memoization caches recursive results; bottom-up tabulation fills a table iteratively.
Define the state
Identify what parameters uniquely describe a subproblem and write the recurrence relating states.
Common patterns
Knapsack, longest common subsequence, edit distance, and grid path problems are frequent DP templates.