Skip to content

Commit 0a8e9d4

Browse files
committed
Create README - LeetHub
source:a3a5c611fd896de150ea4e9fcbef9003a98f2f8c
1 parent a973b10 commit 0a8e9d4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<h2><a href="https://leetcode.com/problems/jump-game">55. Jump Game</a></h2><h3>Medium</h3><hr><p>You are given an integer array <code>nums</code>. You are initially positioned at the array&#39;s <strong>first index</strong>, and each element in the array represents your maximum jump length at that position.</p>
2+
3+
<p>Return <code>true</code><em> if you can reach the last index, or </em><code>false</code><em> otherwise</em>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> nums = [2,3,1,1,4]
10+
<strong>Output:</strong> true
11+
<strong>Explanation:</strong> Jump 1 step from index 0 to 1, then 3 steps to the last index.
12+
</pre>
13+
14+
<p><strong class="example">Example 2:</strong></p>
15+
16+
<pre>
17+
<strong>Input:</strong> nums = [3,2,1,0,4]
18+
<strong>Output:</strong> false
19+
<strong>Explanation:</strong> You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index.
20+
</pre>
21+
22+
<p>&nbsp;</p>
23+
<p><strong>Constraints:</strong></p>
24+
25+
<ul>
26+
<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
27+
<li><code>0 &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
28+
</ul>

0 commit comments

Comments
 (0)