Form biggest number


in ide, it is working well

@Shortcuttohell
your approach is wrong and it fails for this testcase.
1
2
990 99

How to do it then, if it is not the lexico ordering?

this is the comparator, please add this while you are sorting the strings.
auto mycompare = [&](string & a, string & b) {
return a + b > b + a;
};

No test cases passed

remove the stoi part since the numbers can be very large.

and also you are not printing a new line after each test case.

THANK YOUUUU SO MUCHH

1 Like