Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit b1ab5f9

Browse files
committed
added problem63 unique paths
1 parent b8db789 commit b1ab5f9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

problem63/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 62. Unique Paths
2+
3+
There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any point in time.
4+
5+
Given the two integers m and n, return the number of possible unique paths that the robot can take to reach the bottom-right corner.
6+
7+
The test cases are generated so that the answer will be less than or equal to 2 * 109.
8+
9+
10+
# Example 1:
11+
12+
Input: m = 3, n = 7
13+
Output: 28
14+
15+
## Example 2:
16+
17+
Input: m = 3, n = 2
18+
19+
## Output: 3
20+
Explanation: From the top-left corner, there are a total of 3 ways to reach the bottom-right corner:
21+
1. Right -> Down -> Down
22+
2. Down -> Down -> Right
23+
3. Down -> Right -> Down
24+
25+
26+
## Constraints:
27+
28+
1 <= m, n <= 100

0 commit comments

Comments
 (0)