摘要:
题目:和上一题一样,就是这时候给定的数字可能有重复。做法:只要将num排好序,然后判断如果当前的值等于前一个的话,那么就跳过,就不会有重复的人。果然是AC了。 1 class Solution { 2 public: 3 vector > permuteUnique(vector &num)...
阅读全文
posted @ 2014-10-29 00:25
higerzhang
阅读(244)
推荐(0)
编辑
摘要:
题目: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],...
阅读全文
posted @ 2014-10-29 00:05
higerzhang
阅读(287)
推荐(0)
编辑