Form Biggest No

why my code is not producing any output for the test cases?

Hey @i_am_dekard_shaw
Can you post your code?

https://ide.codingblocks.com/s/169482

hope this works …idk how to post codes here…

Hi @i_am_dekard_shaw,
Your code seems fine except the comparision function for sorting that you are using.
since greater() will compare the strings lexicographically, that might be wrong for many case.
Suppose you are comparing two strings β€˜a’ and β€˜b’. your aim is to swap two strings if and only if value of a+b is greater than b+a (Note: β€˜+’ is concatenation of two strings)and here I am comparing these two strings of same length(=length(a)+length(b)).

Refer the code here: https://ide.codingblocks.com/s/169504

If you have any doubt, please do ask.

Thanks,

1 Like

thanks @abhishek.171co203 i was sorting lexicographically decreasing but this method is awesome