Whats wrong in my code, I think thats in the merge sort function of the strings . Plz tell the correction
Dictionary order
Your code is not producing correct output for following test case,
abc
Expected output :
acb
bac
bca
cab
cba
Your output :
acb
bac
bca
cba
cab
I would recommend you to use a bool comparator function in your code for correct order printing,
How to put the bool comparator??
I have edited your code, only few minor changes I have made, refer to this code,