Loading problem…
This problem builds on three-sum. Complete that first, then load your solution to continue.
Given an array nums of n integers, 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, and d are distinctnums[a] + nums[b] + nums[c] + nums[d] == targetYou may return the answer in any order.