摘要:
3SumJan 18 '12 6170 / 23359Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ? b ? c)The solution set must not conta 阅读全文
posted @ 2013-07-10 21:45
懒猫欣
阅读(213)
评论(0)
推荐(0)
摘要:
3Sum Closest Jan 18 '12 3725 / 9704Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.For example, given array S = {-1 2 1 -4}, and t 阅读全文
posted @ 2013-07-10 09:49
懒猫欣
阅读(208)
评论(0)
推荐(0)
浙公网安备 33010602011771号