Why this is not giving all cases right?

this is hackerrank question link
https://www.hackerrank.com/challenges/sorting-array-of-strings/problem

this is my code

hello @dhruvilcodes wait let me see the question and your implementation of code as well .
this will take sometime please wait till then .

yes sir, if possible do fast , Thank You for your reply

are you there sir???

yes .
please see this :
https://www.hackerrank.com/challenges/sorting-array-of-strings/forum
tell me if you dint understand anything in this :
your logic is i think correct but it is not optimised .

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.