A robot stands in the top-left cell of a grid with m rows and n columns. It wants to reach the bottom-right cell. At each step it can move only one cell down or one cell right.
Given m and n, return how many different paths the robot can take.
Examples
Example 1:
Input: m = 2, n = 5
Output: 5
Explanation: The robot goes down once and right four times, in any order. The down move can be in 5 places.
Example 2:
Input: m = 4, n = 3
Output: 10
Explanation: The robot makes 3 downs and 2 rights in some order. That gives 10 different orders.
Example 3:
Input: m = 1, n = 6
Output: 1
Explanation: With one row, the robot can only go right.