摘要: Straight forward idea. Just like the way we multiply numbers. Don't forget considering the carry and be careful. e.g. 123*456,what we usually do is: ... 阅读全文
posted @ 2015-07-10 22:18 ~每天进步一点点~ 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo... 阅读全文
posted @ 2015-07-10 18:20 ~每天进步一点点~ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru... 阅读全文
posted @ 2015-07-10 17:17 ~每天进步一点点~ 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
posted @ 2015-07-10 15:59 ~每天进步一点点~ 阅读(157) 评论(0) 推荐(0) 编辑
摘要: public class Quanpailie { /** * 全排列的思想,第一位和后面的每一位进行交换,然后递归下一位 * combinate(int a[],int start,int end) * 参数的意思是从第start位开始到end位进行全排列 *... 阅读全文
posted @ 2015-07-10 15:33 ~每天进步一点点~ 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
posted @ 2015-07-10 15:27 ~每天进步一点点~ 阅读(195) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2015-07-10 14:15 ~每天进步一点点~ 阅读(115) 评论(0) 推荐(0) 编辑