Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations.
Example
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1], and [2,1,1].

Login to see Answer and Coaching Session More interview questions