Showing Wrong Answer

I have checked my algo. The answer for any of the cases i have tried have come out to be correct, but still it shows wrong answer. Please help.

Hi @Doctor_Insult
Kindly share your code ide so that i can have a look.

here’s my code

Hi @Doctor_Insult
You are making mistake in your compare function. It should first append str2 at the end of str1 and then append str1 at the end of str2 and then compare both of these two strings which is bigger.

Here is the code. I have made the above changes to it.

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.