algorythms
Dynamic Programming
LC #62Medium

Unique Paths

Dynamic Programming
AmazonGoogleMetaBloombergMicrosoft

Problem

Count unique paths from top-left to bottom-right of an m×n grid (only right or down moves).

mathdynamic-programming

Constraints

  • 1 ≤ m, n ≤ 100

Example

Inputm = 3, n = 7
Output28
Why

From top-left to bottom-right of a 3×7 grid, moving only right or down

Hints — reveal one at a time