##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
You've built DP on sequences and grids. Now face capacity constraints and learn to pick or skip items.
Teaches subset selection with contiguity constraints - a partition variant
Bitmask DP knapsack where order matters - teaches state compression
Two-sum knapsack variant tracking which values are achievable as subsets
Multi-constraint knapsack with liquid transfer - complex state design
Knapsack with time constraints and item reconstruction
Prefix-sum optimized knapsack for contiguous segment selection
3D knapsack counting ways - programmer assignment with bug constraints
Classic partition problem that reduces to subset sum - perfect knapsack introduction
Converts to subset sum with positive/negative splits - teaches problem transformation
2D knapsack with two capacity constraints (0s and 1s) - multi-dimensional DP
Disguised partition problem requiring insight to transform into knapsack
Unbounded knapsack counting - teaches difference between combinations and permutations
3D knapsack counting schemes with member and profit constraints
The canonical 0/1 knapsack problem - small capacity, standard state definition.
Knapsack with large capacity but small values - teaches swapping state definition.