Https://online.codingblocks.com/app/player/43294/content/53634/4899/code-challenge


code is not being compiled

Hi @Samriddhshawarma,
ur code is getting compiled both in hackerblocks and in the ide. pls tell where r u facing problem in submitting.

Hi @Samriddhshawarma,
try modifying ur current code. if input=’‘cda’’,
output is
->cad
->acd
->adc
whereas the expected output is :
->acd
->adc
->cad
so inorder to achieve dis, u can do either of these:
1)before permuting ur string , store ur input string in new variable, sort it and pass the sorted string in the permutation function and compare the strings generated while permuting with the original string.
2)store ur output in a set( declare it using set s) and output the elements of set at the end of ur code.

Hope dis resolves ur doubt. If u still have any doubts, feel free to post them here.

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.