I find it diffucult to solve this problem .I am not getting any idea.Can you give me a hint in solving this problem
Hint/ Clue for problem
hello @gvspraveen113
if one number is a and other number is b then how we can join them?
we can join them in two ways like
ab or ba
now since we want maximum we will consder the maximum among the two.
this is the main logic of the problem.
so u can define one comparator
bool cmp(string a,string b){
return a+b > b+a;
}
and then sort all the given numbers based on this comparator.
pls refer this for clarity->