Kindly correct the above code . It is satisfying sample input but it is not satisfying any of the test cases .
Satisfying sample input but not satisfying any test case
hello @arshia27
the logic is incorrect.
try this case
1
2
2 21
the logic is if a and b are two numbers then u can combine them in two ways either ab or ba right?
which ever combination give us maxium we will consider that order.
so just apply same logic in ur comparator and sort using this comparator
bool cmp(string a,string b){
return a+b > b+a;
}