Python simple two pointer approach
\nclass Solution:\n    def fourSum(self, nums: List[int], target: int) -> List[List[int]]:\n        res, n = [], len(nums)\n        nums.sort()\n        for a i
```\nclass Solution:\n    def fourSum(self, nums: List[int], target: int) -> List[List[int]]:\n        res, n = [], len(nums)\n        nums.sort()\n        for a in range(n):\n            for b in range(a+1, n):\n                c = b+1; d = n-1\n                while c<d:\n                    sums = nums[a]+nums[b]+nums[c]+nums[d]\n                    if sums < target:\n                        c += 1\n                    elif sums > target:\n                        d -= 1\n                    else:\n                        toappend = [nums[a],nums[b],nums[c],nums[d]]\n                        if toappend not in res:\n                            res.append(toappend)\n                        c +=1\n                        d-=1\n        return res\n```
['Two Pointers', 'Python']