Recursion-Dictionary order (larger)

Even after giving correct output. My all are test cases are faiing. Please tell where i am going wrong.

Hey you output needs to be sorted
So for input “bac”
Output should be
bca
cab
cba

but your code is giving
cab
bca
cba

So instead of printing them store them in a vector ,which u can sort and print in main.

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.