A Question from leetcode, 求标准解法,本人解的太笨袅# JobHunting - 待字闺中
H*r
1 楼
Given a collection of numbers that might contain duplicates, return all
possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1], and [2,1,1].
注意{ -1,2,0,-1,1,0,1 }有630个不同的permutations
本人把结果存到个set里面去才避免了重复,求正解
possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1], and [2,1,1].
注意{ -1,2,0,-1,1,0,1 }有630个不同的permutations
本人把结果存到个set里面去才避免了重复,求正解