Given an array of integers nums and an integer target, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
0 <= a, b, c, d < na, b, c,anddare distinct.nums[a] + nums[b] + nums[c] + nums[d] == target
You may return the answer in any order.
Examples
Example 1
Input: nums = [3,2,3,-3,1,0], target = 3
Output: [[-3,0,3,3],[-3,1,2,3]]
Example 2
Input: nums = [1,-1,1,-1,1,-1], target = 2
Output: [[-1,1,1,1]]
Example 3
Input: nums = [1,0,-1,0,-2,2], target = 0
Output: [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]
Constraints
1 <= nums.length <= 200-1,000,000,000 <= nums[i] <= 1,000,000,000-1,000,000,000 <= target <= 1,000,000,000