Problem
A robot starts in the top-left cell of an m × n grid and wants to reach the bottom-right cell. It can only move right or down. Return how many different paths it can take.
Example 1
- Input
- m = 3, n = 2
- Output
- 3
- Why
- right-down-down, down-right-down, down-down-right
Example 2
- Input
- m = 3, n = 7
- Output
- 28
Example 3
- Input
- m = 1, n = 1
- Output
- 1
Constraints
1 <= m, n <= 100The answer is at most 2 * 10^9.