随笔分类 -  permutation

[leetcode]Subsets
摘要:SubsetsGiven 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... 阅读全文

posted @ 2014-07-25 22:40 喵星人与汪星人 阅读(236) 评论(0) 推荐(0) 编辑

[leetcode]Permutation Sequence
摘要:Permutation SequenceThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the fo... 阅读全文

posted @ 2014-07-23 20:32 喵星人与汪星人 阅读(329) 评论(0) 推荐(0) 编辑

[leetcode]Next Permutation
摘要:Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangemen... 阅读全文

posted @ 2014-07-23 18:41 喵星人与汪星人 阅读(262) 评论(0) 推荐(0) 编辑

[leetcode]PermutationsII
摘要:Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the follow... 阅读全文

posted @ 2014-07-23 17:25 喵星人与汪星人 阅读(287) 评论(0) 推荐(0) 编辑

[leetcode]Permutations
摘要:PermutationsGiven 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]... 阅读全文

posted @ 2014-07-22 16:26 喵星人与汪星人 阅读(209) 评论(0) 推荐(0) 编辑