STRING SORT(Challanges)

I have solved this problem using inbuilt sort function and by using custom compare function for the 1st test case my ans was coming wrong but when i downloaded the test cases and checked the ans is coming correct then why it was giving wrong ans for first input.


This was the test case which i downloaded 4 ap apple bat batman


This was the test case which i downloaded 4 ap apple bat batman

@mikki18 Just refresh and try again there is no error in code.

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.