Skip to content

Commit 9d2729e

Browse files
Added README.md file for Unique Paths
1 parent 3cc891e commit 9d2729e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

62-unique-paths/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<h2><a href="https://leetcode.com/problems/unique-paths">Unique Paths</a></h2> <img src='https://img.shields.io/badge/Difficulty-Medium-orange' alt='Difficulty: Medium' /><hr><p>There is a robot on an <code>m x n</code> grid. The robot is initially located at the <strong>top-left corner</strong> (i.e., <code>grid[0][0]</code>). The robot tries to move to the <strong>bottom-right corner</strong> (i.e., <code>grid[m - 1][n - 1]</code>). The robot can only move either down or right at any point in time.</p>
2+
3+
<p>Given the two integers <code>m</code> and <code>n</code>, return <em>the number of possible unique paths that the robot can take to reach the bottom-right corner</em>.</p>
4+
5+
<p>The test cases are generated so that the answer will be less than or equal to <code>2 * 10<sup>9</sup></code>.</p>
6+
7+
<p>&nbsp;</p>
8+
<p><strong class="example">Example 1:</strong></p>
9+
<img src="https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png" style="width: 400px; height: 183px;" />
10+
<pre>
11+
<strong>Input:</strong> m = 3, n = 7
12+
<strong>Output:</strong> 28
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre>
18+
<strong>Input:</strong> m = 3, n = 2
19+
<strong>Output:</strong> 3
20+
<strong>Explanation:</strong> From the top-left corner, there are a total of 3 ways to reach the bottom-right corner:
21+
1. Right -&gt; Down -&gt; Down
22+
2. Down -&gt; Down -&gt; Right
23+
3. Down -&gt; Right -&gt; Down
24+
</pre>
25+
26+
<p>&nbsp;</p>
27+
<p><strong>Constraints:</strong></p>
28+
29+
<ul>
30+
<li><code>1 &lt;= m, n &lt;= 100</code></li>
31+
</ul>

0 commit comments

Comments
 (0)