2014年3月7日

3-7

摘要: 刷题相对容易,弄明白一道题或者刷对几道题,非常有成就感,并不浪费时间。看书很麻烦,可能看了一整天也没有感觉什么收获。不过不看书积累好多题没地方下手啊……这周题刷的很少,大神们都是2-3天刷个70-80道,我这都两周才不到40道。慢慢来吧,书必须要看啊! 阅读全文

posted @ 2014-03-07 20:41 pengyu2003 阅读(101) 评论(0) 推荐(0)

4sum

摘要: 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 target.Note:Elements in a quadruplet (a,b,c,d) must be in non-descending order. (ie,a≤b≤c≤d)The solution set must not contain duplicate quadruplets. . 阅读全文

posted @ 2014-03-07 15:42 pengyu2003 阅读(144) 评论(0) 推荐(0)

Letter Combinations of a Phone Number

摘要: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string "23"Output: ["ad", "ae", "af", "bd", "be", &q 阅读全文

posted @ 2014-03-07 14:44 pengyu2003 阅读(134) 评论(0) 推荐(0)

3Sum Closest

摘要: 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 may assume that each input would have exactly one solution. For example, given array S = {-1 2 1 -4}, and target = 1. The sum that is closest to ... 阅读全文

posted @ 2014-03-07 11:03 pengyu2003 阅读(133) 评论(0) 推荐(0)

导航