Quick reference for knapsack variations:
"Can we reach sum ?" → Boolean DP, backward loop, OR operation.
"How many ways to reach ?" → Counting DP, loop order matters (coins outer for combinations).
"Each item has limited copies" → Binary decomposition, then 0/1 knapsack.
"Two constraints" → 2D (two-dimensional) DP array, backward loops in both dimensions. When you see a new problem, ask: what am I trying to improve? (max/min/count/boolean) How many times can I use each item? (once/unlimited/bounded) How many constraints? (one/two/more)