Skip to content

Commit d184342

Browse files
Create README - LeetHub
1 parent 9f00660 commit d184342

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

3sum/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<h2>15. 3Sum</h2><h3>Medium</h3><hr><div><p>Given an integer array nums, return all the triplets <code>[nums[i], nums[j], nums[k]]</code> such that <code>i != j</code>, <code>i != k</code>, and <code>j != k</code>, and <code>nums[i] + nums[j] + nums[k] == 0</code>.</p>
2+
3+
<p>Notice that the solution set must not contain duplicate triplets.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
<pre><strong>Input:</strong> nums = [-1,0,1,2,-1,-4]
8+
<strong>Output:</strong> [[-1,-1,2],[-1,0,1]]
9+
</pre><p><strong>Example 2:</strong></p>
10+
<pre><strong>Input:</strong> nums = []
11+
<strong>Output:</strong> []
12+
</pre><p><strong>Example 3:</strong></p>
13+
<pre><strong>Input:</strong> nums = [0]
14+
<strong>Output:</strong> []
15+
</pre>
16+
<p>&nbsp;</p>
17+
<p><strong>Constraints:</strong></p>
18+
19+
<ul>
20+
<li><code>0 &lt;= nums.length &lt;= 3000</code></li>
21+
<li><code>-10<sup>5</sup> &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
22+
</ul>
23+
</div>

0 commit comments

Comments
 (0)