Please check this approach answer is coming out to be right but test case isnt passing
Approach - string lexicographical way
You can simply take an array of strings, as string arr[100000];, take the input from user and while you are using a sorting function, use a comparator as ,
bool mycompare(string x,string y)
{
string xy=x.append(y);
string yx=y.append(x);
return xy>yx;
}