Grid Path Counting with and without Obstacles: Dynamic Programming Solutions
LeetCode 62. Unique Paths
A robot sits at the top‑left corner of an m × n grid (cell (0, 0)). It can only move down or right one step at a time. The goal is the bottom‑right corner (m-1, n-1). Compute the total number of distinct paths the robot can take.
Example 1
Input: m = 3, n = 7
Output: 28
Example 2
Input: m = 3, n = 2
Output: 3
Possible ...
Posted on Sun, 04 Oct 2026 16:17:47 +0000 by trillion