Paths through a grid
Mediumdynamic programmingmathcombinatorics
A robot starts at the top-left of an m × n grid and moves only right or down. Return the number of distinct paths to the bottom-right cell.
Example 1
Input: m = 3, n = 7 Output: 28
Example 2
Input: m = 3, n = 2 Output: 3
Constraints
- 1 ≤ m, n ≤ 15
Submit checks your solution against 8 tests, including hidden ones.
/**
* @param {int} m
* @param {int} n
* @return {int}
*/
function uniquePaths(m, n) {
}