Unique Permutations
BACKTRACKING
ARRAY
Problem
Given an array nums
of integers that might contain duplicates, return all possible unique permutations in any order.
Examples
permuteUnique([4,4,2]); // returns [[4,4,2],[4,2,4],[2,4,4]]
Loading...
Given an array nums
of integers that might contain duplicates, return all possible unique permutations in any order.
permuteUnique([4,4,2]); // returns [[4,4,2],[4,2,4],[2,4,4]]