##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
When one dimension is not enough. You'll design DP states with multiple parameters for grids and strings.
Classic 3D DP with count constraints - perfect for multi-dimensional state practice
Grid path counting with obstacles - teaches handling constraints in 2D DP
Two parameters
2D DP tracking two string indices simultaneously - teaches merging sequences
Grid path counting with large dimensions - teaches inclusion-exclusion with DP.
Two-path grid DP where paths must cross - teaches multi-agent state design
Grid DP where dp[i][j] is side length of largest square - builds from subproblems in 2D
More DP dimensions, multi-variable transitions.
Foundational 2D grid path counting with obstacles - the classic grid DP template.
Classic Levenshtein distance with insert/delete/replace operations.
Good classic problem
Shows how to compress a 2D grid into O(n) space with bottom-up sweeps