Form biggest number

question = https://hack.codingblocks.com/contests/c/452/1291
solution = https://ide.codingblocks.com/#/s/20713

Use append function in compare function . Like this test case will not work in ur code
1
4
0 90 32 9009
So return s1+s2>s2+s1 in compare function

still giving wrong answer

See this
https://ide.codingblocks.com/#/s/20737

tahnx bro :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face:

Can you explain this in more detail?

#include
#include
using namespace std;
int main() {
int t;
cin>>t;
for(int p=0;p<t;p++)
{
int m;
cin>>m;
long int A[m];
for(int i=0;i<m;i++)
{
cin>>A[i];
}
for(int i=0;i<m-1;i++)
{
string x=to_string(A[i]);
for(int j=i+1;j<m;j++)
{
string y=to_string(A[j]);
if(y+x>x+y)
{
long int temp=A[i];
A[i]=A[j];
A[j]=temp;
}
}
}
for(int i=0;i<m;i++)
{
cout<<A[i];
}
cout<<endl;
}

return 0;

}

why my all test cases are failing in this? can you help me