but my code is working quite well
Test cases run time error
please have a look and help me out
Apologies for a late reply.
In the compare function, you need to compare every character using a for loop instead of this find function.
Check one by one. If the complete string in same, then return the one with longer length.
Please have a look to my sample 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.