Short & Simple Solution in Python
\n\tdef fourSum(self, nums: List[int], target: int) -> List[List[int]]:\n        ans = set()\n        n = len(nums)\n        nums.sort()\n        for i in range
\n\tdef fourSum(self, nums: List[int], target: int) -> List[List[int]]:\n        ans = set()\n        n = len(nums)\n        nums.sort()\n        for i in range(n):\n            for j in range(i+1,n):\n                left = j + 1\n                right = n - 1\n\n                while left < right:\n                    total = nums[i] + nums[left] + nums[right]+nums[j]\n                    if total > target:\n                        right -= 1\n                    elif total < target:\n                        left += 1\n                    else:\n                        ans.add(tuple(sorted((nums[i], nums[left], nums[right],nums[j]))))\n                    \n                        left += 1\n                        right -= 1\n        return ans
['Two Pointers', 'Sorting', 'Ordered Set', 'Python', 'Python3']