Pls revert to the problem as soon as possible


not able to sort the character array lexographically pls tell how it must be done

@Madhavendra-Gupta-2240591552663161 firstly you need to keep a track of the string you are taking as input, so you can compare the output string with it before printing. Secondly, as you can see this is not giving strings in lexicographical order at all, so what you can do is, set string out = in and sort out, so this way when you produce permutations of out they will be in lexicographical order. Now in the base case you just have to compare the original string and its permutation.

@Madhavendra-Gupta-2240591552663161 have a look at this code https://ide.codingblocks.com/s/203327 i have made the approriate changes.

non of test case is passing

@Madhavendra-Gupta-2240591552663161
Madhavendra, u can store all ur valid strings in some vector.then sort the vector and print it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.