What is wring with my 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.

Unable to clear all test cases https://ide.codingblocks.com/s/650765 , please share ur code

vector<string> a(100);
this is creating problem because if you define the size of vector then v.end() will be at 100 location but actually it may contain less elements so while sorting it will create problem

so just remove (100)

Modified 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.