Skip to content

Commit dc5301a

Browse files
committed
Create README - LeetHub
1 parent eb0e53f commit dc5301a

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><a href="https://leetcode.com/problems/4sum/">18. 4Suma>h2><h3>Mediumh3><hr><p>Given an array <code>numscode> of <code>ncode> integers, return <em>an array of all the <strong>uniquestrong> quadrupletsem> <code>[nums[a], nums[b], nums[c], nums[d]]code> such that:p>
2+
3+
<ul>
4+
  • 0 <= a, b, c, d < n
  • 5+
  • a, b, c, and d are distinct.
  • 6+
  • nums[a] + nums[b] + nums[c] + nums[d] == target
  • 7+
    ul>
    8+
    9+
    <p>You may return the answer in <strong>any orderstrong>.p>
    10+
    11+
    <p>&nbsp;p>
    12+
    <p><strong class="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><strong class="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+
  • 1 <= nums.length <= 200
  • 31+
  • -109 <= nums[i] <= 109
  • 32+
  • -109 <= target <= 109
  • 33+
    ul>

    0 commit comments

    Comments
     (0)