💡 String Sort (Algo++, CPP launchpad)

Sample test case passed but stuck in 2nd test case.
Here is my code https://ide.codingblocks.com/s/333149 .
please find the mistakes I have made. Thank you !!