Recursion dictionary order(smaller)


3 testcases showing wrong answer.pls tell the correct code

In the question it is mentioned β€œThe output strings must be sorted.”
Sample Input
cab
Sample Output
abc
acb
bac
bca

Please check this with your code.

pls tell in the form of a code

Refer this thread.

again the testcases are showing wrong answer

Check this.It is passing all cases in my side.