https://ide.codingblocks.com/s/50962
wrong ans on submitting although it is giving right output for sample case
https://ide.codingblocks.com/s/50962
wrong ans on submitting although it is giving right output for sample case
You have to print all the permutations in lexicographical order instead of printing it directly.
can u plz make a lexicographical fn for me in my code, i m not able to make it.
In line no. 8 where you are printing the string just store it in map/set(ordered), since ordered map/set stores the strings in lexicographical order and then print this map/set atlast.