Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1]...
分类:
其他好文 时间:
2014-08-27 20:26:38
阅读次数:
168
HTML Entities
Some characters are reserved in HTML.
It is not possible to use the less than () signs in your text, because the browser will mix them with tags.
To actually display reserved characters, we must use character entities ...
分类:
Web程序 时间:
2014-08-27 18:54:08
阅读次数:
304
String to Integer (atoi)
Total Accepted: 15482 Total
Submissions: 106043My Submissions
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases...
分类:
其他好文 时间:
2014-08-27 01:40:07
阅读次数:
293
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:
其他好文 时间:
2014-08-27 01:37:16
阅读次数:
242
the algorithm is like this: it evenly spreads an integer N over K cells.for i = 0 to K array[i] = N / K # integer division# divide up the remain...
分类:
其他好文 时间:
2014-08-26 05:20:04
阅读次数:
205
LeetCode: Palindrome PartitionGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome ...
分类:
其他好文 时间:
2014-08-24 19:21:22
阅读次数:
196
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4.....
分类:
其他好文 时间:
2014-08-23 21:37:41
阅读次数:
199
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:
其他好文 时间:
2014-08-23 21:34:11
阅读次数:
288
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-08-23 18:53:01
阅读次数:
180
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-08-23 15:11:00
阅读次数:
153