# 49.leetcode题目18. 4Sum

Given an array S of n integers, are there elements abc, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.

Note:

• Elements in a quadruplet (a,b,c,d) must be in non-descending order. (ie, a ≤ b ≤ c ≤ d)
• The solution set must not contain duplicate quadruplets.

    For example, given array S = {1 0 -1 0 -2 2}, and target = 0.

A solution set is:
(-1,  0, 0, 1)
(-2, -1, 1, 2)
(-2,  0, 0, 2)

Line 3: stray ‘\357’ in program

accept，but~

#### LeetCode 18 4Sum (C,C++,Java,Python)

2015-05-10 15:04:02

#### 18. 4Sum Leetcode Python

2015-01-17 11:55:43

#### leetcode 18 -- 4Sum

2015-06-04 15:12:14

#### (Java)LeetCode-18. 4Sum

2016-05-30 19:59:46

#### leetcode-Java-18. 4Sum

2016-06-03 18:18:09

#### leetcode解题之 18. 4Sum Java版（结果是目标值的四个数字和）

2017-04-06 18:43:11

#### leetcode 18. 4Sum KSum的解决办法

2017-08-31 15:50:38

#### 【LeetCode-面试算法经典-Java实现】【018-4Sum（四个数的和）】

2015-07-22 07:22:02

#### [leetcode: Python]18.4Sum

2017-05-19 08:18:55

#### [C++]LeetCode: 71 4Sum && kSum总结

2015-01-06 10:43:37