Skip to content

Commit 0829fca

Browse files
committed
Create README - LeetHub
1 parent c678ec4 commit 0829fca

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

0136-single-number/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<h2><a href="https://leetcode.com/problems/single-number">136. Single Number</a></h2><h3>Easy</h3><hr><p>Given a <strong>non-empty</strong>&nbsp;array of integers <code>nums</code>, every element appears <em>twice</em> except for one. Find that single one.</p>
2+
3+
<p>You must&nbsp;implement a solution with a linear runtime complexity and use&nbsp;only constant&nbsp;extra space.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<div class="example-block">
9+
<p><strong>Input:</strong> <span class="example-io">nums = [2,2,1]</span></p>
10+
11+
<p><strong>Output:</strong> <span class="example-io">1</span></p>
12+
</div>
13+
14+
<p><strong class="example">Example 2:</strong></p>
15+
16+
<div class="example-block">
17+
<p><strong>Input:</strong> <span class="example-io">nums = [4,1,2,1,2]</span></p>
18+
19+
<p><strong>Output:</strong> <span class="example-io">4</span></p>
20+
</div>
21+
22+
<p><strong class="example">Example 3:</strong></p>
23+
24+
<div class="example-block">
25+
<p><strong>Input:</strong> <span class="example-io">nums = [1]</span></p>
26+
27+
<p><strong>Output:</strong> <span class="example-io">1</span></p>
28+
</div>
29+
30+
<p>&nbsp;</p>
31+
<p><strong>Constraints:</strong></p>
32+
33+
<ul>
34+
<li><code>1 &lt;= nums.length &lt;= 3 * 10<sup>4</sup></code></li>
35+
<li><code>-3 * 10<sup>4</sup> &lt;= nums[i] &lt;= 3 * 10<sup>4</sup></code></li>
36+
<li>Each element in the array appears twice except for one element which appears only once.</li>
37+
</ul>

0 commit comments

Comments
 (0)