i have attatched link to my code its working perfectly fine on online compilers but here its showing run error pls help.
https://onlinegdb.com/ryN7P1tMw
where is the corrected code?
i opened the link it shows only printing hello world.
It is there only. But anyway I am printing the code here.
#include<bits/stdc++.h>
using namespace std;
bool func(string a, string b){
return a+b>b+a;
}
int main() {
int n;
cin>>n;
while(n--)
{
string s[100];
int inp;
cin>>inp;
for(int i=0;i<inp;i++) cin>>s[i];
sort(s,s+inp, func);
for(int j=0;j<inp;j++) cout<<s[j];
cout<<endl;
}
return 0;
}
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.