Compare function not hold true for same length string

Hi! ,sir,\mam,
in sorting,compare function not hold true ,when i passed two same length string,according to if condition it should return string which has greater lexo graphical order,but it not work
please look at my problem.

https://ide.codingblocks.com/s/260073 is my source code

hi @Nikhil-Jettley-2567269533523013 change return condition to
return a<b; to sort in ascending order.

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.