42. Unique Paths
MediumDynamic programming
A robot starts at the top-left of an m × n grid and can only move right or down. Return the number of distinct paths to the bottom-right corner.
Example 1
Input: m = 3, n = 7 Output: 28
Example 2
Input: m = 3, n = 2 Output: 3
Constraints
1 ≤ m, n ≤ 100The answer fits in a 32-bit integer for the tests