Given a collection of numbers that might contain duplicates, return all possible unique permutations in C++

Example: Input: [1,1,2] Output: [ [1,1,2], [1,2,1], [2,1,1] ] In my pervious post we have discussed three solutions where the numbers are unique. Recommend to read that post before proceeding to this. Given a collection of distinct integers, return all possible permutations. This problem can also be solved in 4 different ways. Namely: 1. Backtracking … Continue reading Given a collection of numbers that might contain duplicates, return all possible unique permutations in C++