- Wrong base case initialization: dp[0] is often 0, 1, or true depending on problem semantics. Think carefully about what empty input means.
- Off-by-one in array indexing: Whether dp[i] represents "up to index i" or "exactly at index i" affects loop bounds and transitions.
- Forgetting impossible states: In minimization problems, initialize with infinity.
Check for impossible results before returning.
- Not recognizing space optimization opportunity: Many 1D DP problems only need previous - values, reducing space to .