It is giving right outut for custom inputs but not for testcases
@Namanjain123 hey naman see this input
1
8
1 34 3 98 9 76 45 4
your output is wrong
989764543431
but output should be
998764543431
what changes should i make in my code
@Namanjain123 hey naman change the compare function.
int compare(string a, string b){
string first = a.append(b);
string second = b.append(a);
return first.compare(second) >0 ? 1:0;
}
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.