ques-https://www.interviewbit.com/problems/all-unique-permutations/#
How to approach this problem
If you how to print all permuations then it is easy while swapping just check if current value element has occurred previously or not.in current recursive call.
If it has occurred then don’t make recursive call for the current swap.
Else make recursive call.
If you don’t know how to print all permuatation then look at this link: