This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingFind the cheapest right or down path through a grid of costs.
What this asks
Find the cheapest right and down path through a grid of costs.
dp[r][c] = grid[r][c] + min(top, left).
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing