Leetcode 18
LeetCode 18, 4Sum asks for every unique quadruplet [a, b, c, d] in an array nums that sums to a target. For example, given nums = [1, 0, -1, 0, -2, 2] and target = 0, the answer is [[-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]]. The word unique is the whole game here. It is easy to find quadruplets that sum to the target; it is annoying to make sure you never report the same one twice. ...