I am not able to solve this problem ?
I am not able to solve this problem?
Hi,
So this question seems tough and complex at first
but the main background just using customized sorting
that is can take input as string and
sort the string using customized sorting
ie return a+b > b+a;
for eg:
U Pass in string a as 9 and string b be as 50
so the comparator function compare
a+ b as 950
b+a as 509
return the one larger in value
so 950 will be returned.
Please try to code IN case of query please ask.
1 Like
can you provide the proof why it works?
sir i have stated an example in the above explanation
i feel that it gives u a fair idea why comparing
a+b with b+a should work for the given problem statement