All test case deosn't pass

this is my code:
https://ide.codingblocks.com/s/65578
it gives the wrong answer for the last test case …

@Nargis hey nargis i have corrected your code you can refer this.

Thanks for your time…
but the backtracking is important n…
what is the problem with th strcmp() in my code ??

in this question the main task is to design compare function this question is soon uploaded on our youtube channel stay tuned . in my point of view don’t use strcmp().

Hi Nargis, consider the following input:
231
Expected output is:
321
312
Your code’s output:
312
321

Your code is not giving correct answer for this testcase.

Hey Nargis, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.