排列组合
文章平均质量分 81
哎-哭泣的鱼
这个作者很懒,什么都没留下…
展开
-
【LeetCode】Subsets I && II
1、SubsetsTotal Accepted: 7967 Total Submissions: 29509 My SubmissionsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.原创 2014-03-01 21:42:29 · 1647 阅读 · 0 评论 -
【LeetCode】Combinations && Letter Combinations of a Phone Number
1、Combinations Total Accepted: 8363 Total Submissions: 28177 My SubmissionsGiven two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k =原创 2014-03-20 17:51:19 · 935 阅读 · 0 评论 -
【LeetCode】Permutation Sequence
Permutation Sequence Total Accepted: 3033 Total Submissions: 14751 My SubmissionsThe set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in o原创 2014-01-17 13:48:25 · 2827 阅读 · 0 评论 -
【LeetCode】Next Permutation
Next Permutation Total Accepted: 4075 Total Submissions: 16219 My SubmissionsImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If原创 2014-01-24 12:53:59 · 1034 阅读 · 0 评论 -
【LeetCode】Permutations && Permutations II
1、Permutations Total Accepted: 6396 Total Submissions: 20594 My SubmissionsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[原创 2014-01-24 14:34:58 · 2969 阅读 · 0 评论