一.问题描述
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].
二.我的解题思路
最简单的思路就是在之前permutation的基础上,使用hash_map来记录每个出现过的排列。这样做比较简单,但是耗时比较大,leetcode上测试居然没有超时。。
比较好的解题思路参见 http://blog.youkuaiyun.com/a83610312/article/details/9632497