Can you pls check my code

i am uploading it here

this is the updated one https://ide.codingblocks.com/s/391830

check this one out https://ide.codingblocks.com/s/391830

Hey @sid.rajput23,
The question is fairly simple and you just have to use the compare function in sorting to solve it .
for intuition if there are two strings X and Y . To know which number is bigger what we can do is to append the strings in all the possible form .

If there are only two strings X and Y the only two possiblities to append in XY and YX .
So we look into which of the two strings is bigger to get the local optimal solution and this question can be solved using greedy aproach so the locally optimal solution will also be the globally optimal solution .

This is the code as to how it is solved


If you have any doubts or queries you can ask here and if you want to explain something which i failed to understand you can always reply here :slight_smile:
Happy Coding !!

1 Like