The problem tricky permutations


where do I call the function for lexicography in my code

Hello @Saransh99,

To print the strings in lexicographical order.
Just sort the characters of input string before passing it to the function:

sort(a.begin(),a.end());
printPermutationsNoDuplicates(a,"");

Hope, this would help.
Give a like, if you are satisfied.

thankuuu :))))))))))))))))))))))))

Please, mark this doubt as resolved.
BTW, i won’t mind a like.

1 Like