Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdc5301a

Browse files
committed
Create README - LeetHub
1 parenteb0e53f commitdc5301a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

‎0018-4sum/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<h2><ahref="https://leetcode.com/problems/4sum/">18. 4Sum</a></h2><h3>Medium</h3><hr><p>Given an array <code>nums</code> of <code>n</code> integers, return <em>an array of all the <strong>unique</strong> quadruplets</em> <code>[nums[a], nums[b], nums[c], nums[d]]</code> such that:</p>
2+
3+
<ul>
4+
<li><code>0 &lt;= a, b, c, d&nbsp;&lt; n</code></li>
5+
<li><code>a</code>, <code>b</code>, <code>c</code>, and <code>d</code> are <strong>distinct</strong>.</li>
6+
<li><code>nums[a] + nums[b] + nums[c] + nums[d] == target</code></li>
7+
</ul>
8+
9+
<p>You may return the answer in <strong>any order</strong>.</p>
10+
11+
<p>&nbsp;</p>
12+
<p><strongclass="example">Example 1:</strong></p>
13+
14+
<pre>
15+
<strong>Input:</strong> nums = [1,0,-1,0,-2,2], target = 0
16+
<strong>Output:</strong> [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]
17+
</pre>
18+
19+
<p><strongclass="example">Example 2:</strong></p>
20+
21+
<pre>
22+
<strong>Input:</strong> nums = [2,2,2,2,2], target = 8
23+
<strong>Output:</strong> [[2,2,2,2]]
24+
</pre>
25+
26+
<p>&nbsp;</p>
27+
<p><strong>Constraints:</strong></p>
28+
29+
<ul>
30+
<li><code>1 &lt;= nums.length &lt;= 200</code></li>
31+
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
32+
<li><code>-10<sup>9</sup> &lt;= target &lt;= 10<sup>9</sup></code></li>
33+
</ul>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp