This code isn’t working, whats wrong?
Is this the right approach?
hey @goyalvivek for input: acb
Expected output is:
bac
bca
cab
cba
Yours is giving is:
acb
abc
cab
cba
bca
bac
Do what, store each output sting in a vector of string, and then sort them. Then print that string vector, all your test cases will get passed.
Take this for reference
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.