Sample Input 0
6 31415926535897932384626433832795 1 3 10 3 5
Sample Output 0
1 3 3 5 10 31415926535897932384626433832795
my solution
include <bits/stdc++.h>
using namespace std; int main() { long long int n,i,a,s=0,m ; string str[201202]; cin>>n; for(i=0;i<n;i++) cin>>str[i]; sort(str,str+n); for(i=0;i<n;i++) { cout<<str[i]; } return 0; }
But i am getting this as output (attached ) Any help will be highly appreciated :)
I guess you are asking about this problem : https://www.hackerrank.com/contests/w29/challenges/big-sorting
I won't give solution, but just hint: use comparator.
you need:
good luck. (Y)