Many test cases pass, submission fails

I have tried various test cases and they have passed. Need help with the compare function.

hi kunal…there is a problem with the logic of the compare function

suppose you have 2 nos, 54 and 542 , your compare function will sort them as 542 , 54 which will give answer as 54254

but correct ans would be 54542

incase you are not able to find the right logic for compare function, tell me

i’ll help you in that

I have got it now. Thanks

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.