mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<p>Given an array of non-negative integers <code>arr</code>, you are initially positioned at <code>start</code> index of the array. When you are at index <code>i</code>, you can jump to <code>i + arr[i]</code> or <code>i - arr[i]</code>, check if you can reach to <strong>any</strong> index with value 0.</p>
|
||||
<p>Given an array of non-negative integers <code>arr</code>, you are initially positioned at <code>start</code> index of the array. When you are at index <code>i</code>, you can jump to <code>i + arr[i]</code> or <code>i - arr[i]</code>, check if you can reach <strong>any</strong> index with value 0.</p>
|
||||
|
||||
<p>Notice that you can not jump outside of the array at any time.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> arr = [4,2,3,0,3,1,2], start = 5
|
||||
@@ -14,7 +14,7 @@ index 5 -> index 4 -> index 1 -> index 3
|
||||
index 5 -> index 6 -> index 4 -> index 1 -> index 3
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> arr = [4,2,3,0,3,1,2], start = 0
|
||||
@@ -24,7 +24,7 @@ index 5 -> index 6 -> index 4 -> index 1 -> index 3
|
||||
index 0 -> index 4 -> index 1 -> index 3
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> arr = [3,0,2,1,2], start = 2
|
||||
|
Reference in New Issue
Block a user