Form biggest number

how to approach for this problem

Hello @mohitsharmakosi2001 the simple logic you can apply in this is that take the sort function and take compare in it .
in that compare function return the max of
a+b or b+a .
in this way you can do this question.
Here for your reference i am attaching the code:

why are we doing a+b>b+a to sort it lexographically

after appending number to each end we are checking that which is giving the greater result out of them.