摘要: STL中的每个算法都非常精妙, ForwardIterlower_bound(ForwardIter first, ForwardIter last,const _Tp& val)算法返回一个非递减序列[first, last)中的第一个大于等于值val的位置。 ForwardIter uppe... 阅读全文
posted @ 2014-06-18 17:44 穆穆兔兔 阅读(608) 评论(0) 推荐(0) 编辑
摘要: Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ... 阅读全文
posted @ 2014-06-18 15:50 穆穆兔兔 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m... 阅读全文
posted @ 2014-06-18 13:45 穆穆兔兔 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all uniquetriplets in the array which gives the sum of z... 阅读全文
posted @ 2014-06-18 10:27 穆穆兔兔 阅读(209) 评论(0) 推荐(0) 编辑