Form biggest no?

how to approach this problem??

Let us suppose you have to arrange two numbers A and B to obtain the larger number. You will have to decide which number to put first – we compare two numbers AB ( B appended at the end of A) and BA (A appended at the end of B). If AB is larger, then A should come before B in output, else B should come before. You can append them as strings for comparison.

this is basically a string sort question
where u make a custom comparator and
u neeed to make the comparison of 2 integers by converting to string
return a+b > b+a
eg:
a = 9
b = 90
so to form biggest number a+b -> 990
and b+a -> 909
so which is bigger 990
even though 90 is numerically greater than 9

so the crux is to return a+b > b+a
a & b are string value of int being passed as paramter

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.