Tricky permutations


please check the logic… 3 of my test cases are not passing and also i’m not able to understand the editorial…

Hey @dishask99 one of the easier way of doing this question is to generate the permutations assuming each character is different, and when you are printing them just check if current string in the vector is equal to previous string if it is don’t print it else print it ( same elements come together in a sorted array or vector)
Here is the code with the same implemented: https://ide.codingblocks.com/s/173686.

Hey @dishask99 I hope I have cleared your doubt if so please mark the doubt as resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.