摘要:
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: ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
摘要:
public class Quanpailie { /** * 全排列的思想,第一位和后面的每一位进行交换,然后递归下一位 * combinate(int a[],int start,int end) * 参数的意思是从第start位开始到end位进行全排列 *... 阅读全文
摘要:
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
摘要:
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... 阅读全文