How to deal with negative numbers

I wrote the following code andthought it to be correct but it doesnt pass any test case.
#include
#include<bits/stdc++.h>
using namespace std;

bool cmp (string a, string b)
{
if(a.compare(b) > 0)
return true;
else
return false;
}
int main() {
int j;
cin>>j;
while(j–)
{
int n;
cin>>n;
vectors(n);
// string s[n];
for(int i=0;i<n;i++)
{
string st;
cin>>st;
s[i]=st;
}
// cin>>s[i];

	string res="";
	sort(s.begin(),s.end(),cmp);
	for(int i=0;i<n;i++)
	{
		cout<<s[i];
	}
}
return 0;

}

hi @yaheyafarooqui_8319591c036ff6e9
numbers cant be negative as per the constraint of the question so don’t worry about that
further if you want me to check the logic also then can you please share the code by going here https://ide.codingblocks.com/
copy paste it, save it and send me the link

@yaheyafarooqui_8319591c036ff6e9
check the test case
1
4
100 20 30 10
your code gives : 302010010
ans is 302010100

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.