Test cases are not passing .can you please tell me the test case that i am ignoring

@sjduttabbsr2017 hey sindhu your code is not working for this case
231
your output is
312
321
but actual output will be
321
312

sindhu when u r ouputing the string
1 index is upto k and at last ur are checking k+1
2. also if last 2 are same then it will not output even 1 time as they are equal and next time loop will be finish

hello!!
the (k+1)th index in the array should contain the garbage value which can’t be equal to the kth index element .Even if I change the code according to your suggestion,it is still giving wrong ans .
https://ide.codingblocks.com/s/74230

In the question it is given that we should print the lager permutations in dictionary order or ascending order .But u have printed the element in descending order.Can u please explain?

u didnt know what the garbage is thats why i am telling u to remove that condition,it can create an error
other wise ur code is fine we will check out the test cases of these and reply u back.
:slightly_smiling_face:

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.