Pattern Recognition Drill
Medium Dynamic Programming
The Problem
Find path from top-left to bottom-right minimizing sum. Move only right or down.
What approach would you use?
Think about it before scrolling down.
Fill grid: each cell = own value + min(above, left). O(m*n) time. Can reuse the grid for O(1) extra space.
Common Trap
BFS/DFS would explore too many paths. The constraint (only right/down) makes DP perfect — no cycles.