Math Fundamentals18 sections · 814 units
Open in Course

Counting Paths on Grids

(Classic DP problem)

You stand at the top-left of a grid. You want to reach the bottom-right. You can only move right or down. How many paths exist?

This is a counting problem. Each path is a sequence of moves. You need to count all valid sequences.

The sum and product rules alone don't solve this directly. You need a different approach: dynamic programming. But the thinking is the same.