#include
#include
using namespace std;
void bubble_sort(long long int a[],unsigned long int n)
{
long int itr,j;
for(itr=1;itr<=n-1;itr++)
{
for(j=0;j<=(n-itr-1);j++)
{
if(a[j]>a[j+1])
swap(a[j],a[j+1]);
}
}
}
int main() {
unsigned long int n,i;
long long int a[1000000];
cin>>n;
for(i=0;i<n;i++)
cin>>a[i];
bubble_sort(a,n);
for(i=0;i<n;i++)
cout<<a[i]<<" ";
return 0;
}
The condition for n was given that it has to be positive and array varies between -100000000 to 100000000.
So,according to that I specified the conditions but still I am getting error that all test cases are not matched although the code was successfully complied.