Remember
- A 1D DP is an array filled left to right. The rule says which earlier cells each one reads.
- Take-or-skip (house robber) and extend-or-restart (Kadane) are two-option rules, so a comparison per cell.
- If the rule only reads a fixed number of cells back, the table can shrink to those few variables.