You've learned Knapsack variations: boolean, counting, bounded, and multi-constraint versions. But all these problems had a capacity constraint. What about problems with spatial structure? What if you're moving through a grid? The next sections explore DP on different structures: grids, strings, intervals, and trees.
The state becomes position or structure-dependent. The core pattern stays the same: define state, write transition, fill table. The only thing that changes is what the state represents.