Given an array S of n integers, are there any k elements in S such that a[1]+a[2]+..+a[k] = target? Find all unique quadruplets in the array which gives the sum of target.
Some Details
#1 k=2 and target=0, return the index, the solution is unique
#15 k=3 and target=0
#16 k=3, return the sum which is closest to the target
leetcode #1 #15 #16 #18 #167 K-Sum Problem Solution
Problem DescriptionGiven an array S of n integers, are there any k elements in S such that a[1]+a[2]+..+a[k] = target? Find all unique quadruplets in the array which gives the sum of target.Some Det