Interview bit problem largest number

sir, i have tried the following solution for the interview problem largest Number. can u plzz suggest whats wrong

code: https://ide.codingblocks.com/s/331577

@aman17nov1999, you have to return string as output,
when your are doing ,
s+=(f1);
so here f1 is an integer , so it is adding the character that has the ascii value equal to f1, also conceptually , for input like ,
2
9 998

also , it will be much better if you convert the numbers into string , so you don’t have to take log and it will be much simpler and easy to implement and understand

your code output will be 9989 but actually it should be 9998

refer this for detail explanation on the solution :-

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.