Solve subproblems using 1D tabulation or memoization arrays
1 standard techniques
dp[i] = best or count for first i items.