Recursion dictionary order smaller

output order not matching.
link- https://ide.codingblocks.com/s/179883

@mayankjindal40 In the question it is given that output must be sorted. So you should store all the permutation in a vector in the recursive function and then sort it in the main before printing the result.
Refer this

1 Like

got it .

thank you for solving my doubt

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.