String Sort Question

In one of the test cases, it is showing run error. Can you please tell me what could be the problem?

Kajal, pls send the code by saving on ide so that I could check it…

https://ide.codingblocks.com/s/162027 This is the link to my code

Kajal, you need to make the following changes in your code,
Declare the array dynamically, Use your own compare function, instead of inbuilt one in the code, and then try to submit the code…

https://ide.codingblocks.com/s/165126 link to my code