1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 22:42:52 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -5,13 +5,13 @@
<ul>
<li><code>0 &lt;= i, j &lt; nums.length</code></li>
<li><code>i != j</code></li>
<li><code>nums[i] - nums[j] == k</code></li>
<li><code>|nums[i] - nums[j]| == k</code></li>
</ul>
<p><strong>Notice</strong> that <code>|val|</code> denotes the absolute value of <code>val</code>.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<p><strong class="example">Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums = [3,1,4,1,5], k = 2
@@ -20,7 +20,7 @@
Although we have two 1s in the input, we should only return the number of <strong>unique</strong> pairs.
</pre>
<p><strong>Example 2:</strong></p>
<p><strong class="example">Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums = [1,2,3,4,5], k = 1
@@ -28,7 +28,7 @@ Although we have two 1s in the input, we should only return the number of <stron
<strong>Explanation:</strong> There are four 1-diff pairs in the array, (1, 2), (2, 3), (3, 4) and (4, 5).
</pre>
<p><strong>Example 3:</strong></p>
<p><strong class="example">Example 3:</strong></p>
<pre>
<strong>Input:</strong> nums = [1,3,1,5,4], k = 0