Skip to content

Commit 9ff3e8d

Browse files
Create README - LeetHub
1 parent d0f79e4 commit 9ff3e8d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

contains-duplicate/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<h2>217. Contains Duplicate</h2><h3>Easy</h3><hr><div><p>Given an integer array <code>nums</code>, return <code>true</code> if any value appears <strong>at least twice</strong> in the array, and return <code>false</code> if every element is distinct.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong>Example 1:</strong></p>
5+
<pre><strong>Input:</strong> nums = [1,2,3,1]
6+
<strong>Output:</strong> true
7+
</pre><p><strong>Example 2:</strong></p>
8+
<pre><strong>Input:</strong> nums = [1,2,3,4]
9+
<strong>Output:</strong> false
10+
</pre><p><strong>Example 3:</strong></p>
11+
<pre><strong>Input:</strong> nums = [1,1,1,3,3,4,3,2,4,2]
12+
<strong>Output:</strong> true
13+
</pre>
14+
<p>&nbsp;</p>
15+
<p><strong>Constraints:</strong></p>
16+
17+
<ul>
18+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
19+
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
20+
</ul>
21+
</div>

0 commit comments

Comments
 (0)