Why showing partial correct anwer

Hi @frzkaleem,
in ur compare function try using dis logic:
if(s1+s2>s2+s1){
return true;
}
else{
return false;
}
Ur code will work

in ur present code, if input={9,991}, ur code will give 9919 as output and correct output is 9991.