I have used comparator and sorted the string array lexicographically and getting right custom outputs.
Form Biggest Number
Hello @GreatCoderboy123,
This how you are supposed to solve this problem.
In case if you are facing any error as you have posted a doubt.
Please, share your code.
I am getting wrong answer in test case.
Hello @GreatCoderboy123,
-
There is a problem in your compare function:
x.append(y) will add y after x thus changing the string x.
so, y.append(x) is actually y.append(xy).
Suggestion:
Try to print x before and after the append statement inside the compare function.
Solution:
You ‘+’ operator as it does not make any changes to x. -
the output of each test case should be printed on a separate line.
I have modified your code:
Hope this would help.
Give a like if you are satisfied.
ok…Thanks…The test case got passed