what is wrong in my code
why testcases are not passing
Dictionary order larger
It is given that the output must be in sorted order. Your code will generate the correct permutations but it is not guaranteed that your output will be sorted. For that…instead of printing in base case…you must push it in a vector in the base case.You should then sort the resulting vector in the main before printing the final result.
Here is a reference code https://ide.codingblocks.com/s/295870
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.