Form biggest number


what is the problem
is there we have to do more than lexographical sorting

can u please help by suggesting the case which i am missing

see this test case:
8
1 34 3 98 9 76 45 4
Expected Output
998764453341

but how can we treat it as 998 as we have 98 as a whole number?

can u suggest some method to do that

Logic:
we consider both the cases a+b and b+a as well
and then accordingly return true or false from compare function

NOTE:
int atoi (const char * str); Convert string to integer.
atoi takes char* and return integer corresponding to str
so in the code first i convert string to char* and then use atoi

i hope this helps
if your doubt is resolved don’t forgot to mark it as resolved

ok thanks i got that

1 Like