I am able to print all the required strings but their order is not the same as the sample output
Dictionary smaller recursion
I have modified your code. In this I have taken a string instead of char array, and have used mycompare function to compare the input and output, rest logic of yours is same. Kindly see to it