Solution: 4Sum
Let’s solve the 4Sum problem using the Two Pointers pattern.
We'll cover the following...
We'll cover the following...
Statement
Given an array nums
of nums[a]
, nums[b]
, nums[c]
, nums[d]
] such that:
a
,b
,c
,d
a
,b
,c
, andd
are distinct.nums[a]
+nums[b]
+nums[c]
+nums[d]
target
You may return the answer in any order.
Constraints:
nums.length
...