Form Biggest Number

Output was correct, but the test case didn’t pass.
What could be the possible error??
https://ide.codingblocks.com/s/141491

Hello @prashantverma.vn,

  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.

1 Like