Form biggest number


I have made an array of strings so that while comparing the 2 numbers like 62 and 550 the output comes to be 62>550.
but this is not submitting .

@pearlgupta2000
How can I help you? Could you please tell me the exact doubt? Is it giving wrong ans on submission or what?

it is giving wrong ans on submission.

@pearlgupta2000
there is a mistake in compare function. Change it to
bool compare(string a,string b){

if(a+b > b+a){ return true; }

else return false;

}

@pearlgupta2000
Your code is giving wrong ans for these type of testcases
1
2
9 98
ans should be “998” but your code gives “989”