Skip to content

Commit ecd04fa

Browse files
committed
Create README - LeetHub
1 parent 31bbf1d commit ecd04fa

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

0219-contains-duplicate-ii/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<h2><a href="https://leetcode.com/problems/contains-duplicate-ii/">219. Contains Duplicate II</a></h2><h3>Easy</h3><hr><div><p>Given an integer array <code>nums</code> and an integer <code>k</code>, return <code>true</code> <em>if there are two <strong>distinct indices</strong> </em><code>i</code><em> and </em><code>j</code><em> in the array such that </em><code>nums[i] == nums[j]</code><em> and </em><code>abs(i - j) &lt;= k</code>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre><strong>Input:</strong> nums = [1,2,3,1], k = 3
7+
<strong>Output:</strong> true
8+
</pre>
9+
10+
<p><strong class="example">Example 2:</strong></p>
11+
12+
<pre><strong>Input:</strong> nums = [1,0,1,1], k = 1
13+
<strong>Output:</strong> true
14+
</pre>
15+
16+
<p><strong class="example">Example 3:</strong></p>
17+
18+
<pre><strong>Input:</strong> nums = [1,2,3,1,2,3], k = 2
19+
<strong>Output:</strong> false
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>5</sup></code></li>
27+
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
28+
<li><code>0 &lt;= k &lt;= 10<sup>5</sup></code></li>
29+
</ul>
30+
</div>

0 commit comments

Comments
 (0)