YUNOVA · Data Structures & Algorithms · Module 11: Advanced dynamic programming
DP on grids
DP on grids
Key points
- Grid DP stores the answer for each cell, built from neighbouring cells.
- Unique paths: dp[i][j] = dp[i-1][j] + dp[i][j-1].
- Fill the table row by row so needed cells are already computed.