- 博客(6)
- 收藏
- 关注
原创 Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible
2015-05-28 10:22:36 174
原创 Permutations
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], [3,1,2], and [3,2,1]. public clas
2015-05-28 10:20:34 155
原创 Subsets2
Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain du
2015-05-28 10:13:42 175
原创 Subsets
Subsets Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
2015-05-28 10:09:27 171
原创 Combinations Related
Combinations 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: [[1,2] [1,3] [1,4] [2,3] [2,4] [3,4]]
2015-05-28 07:42:45 180
原创 Gray Code
Gray Code The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, pri
2015-05-28 07:36:52 159
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人