I tried my own logic many times but i got wrong result in the editorial .
Then i check the solution provide by you and try to run it but it shows run time error…
Not satisfied with the solution provided by you
see this:
T’he code provided by you showing compile error , Please provide a correct solution, if it possible provide its explanation also.
my bad,The idea is to use any comparison based sorting algorithm. In the used sorting algorithm, instead of using the default comparison, write a comparison function myCompare() and use it to sort numbers. Given two numbers X and Y, how should myCompare() decide which number to put first – we compare two numbers XY (Y appended at the end of X) and YX (X appended at the end of Y). If XY is larger, then X should come before Y in output, else Y should come before. For example, let X and Y be 542 and 60. To compare X and Y, we compare 54260 and 60542. Since 60542 is greater than 54260, we put Y first.