摘要: Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Example 1: Input: nums = [1, 阅读全文
posted @ 2015-03-23 14:57 Grandyang 阅读(30204) 评论(10) 推荐(2) 编辑
摘要: Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2, 阅读全文
posted @ 2015-03-23 08:29 Grandyang 阅读(54284) 评论(1) 推荐(0) 编辑
摘要: 这是Combinations 组合项的延伸,在这里,我们允许不同的顺序出现,那么新的题目要求如下:Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4... 阅读全文
posted @ 2015-03-23 07:56 Grandyang 阅读(817) 评论(0) 推荐(0) 编辑
摘要: The set [1, 2, 3, ..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following s 阅读全文
posted @ 2015-03-23 01:44 Grandyang 阅读(22053) 评论(6) 推荐(2) 编辑
Fork me on GitHub