Problem in figuring out the mistake in solution

I am unable to figure out the problem in my solution…
https://ide.codingblocks.com/s/423879 ---- Can you also share a more efficient method ?

Hello @gautam74 See in your compare function just append b to a first and then a to b and then return the max of both.
You will get the biggest number possible.
Here for your reference I am attaching the code:https://ide.codingblocks.com/s/388113

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.