Form Biggest Number

I have used comparator and sorted the string array lexicographically and getting right custom outputs.

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,

  1. 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.

  2. 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

Anytime @GreatCoderboy123,

Please, mark it as resolved.