Quick_sort problem questions

#include
#include
#include
using namespace std;
void shuffle(int a[],int s,int e)
{
srand(time(NULL));
int i,j;
for(int i=e;i>0;i–)
{
j=rand()%(i+1);
// cout<<rand()<<endl;
swap(a[i],a[j]);
}
}
int partition_element(int a[],int s,int e)
{

int pivot=a[s];
int i=e+1;
int j=e;
for( ;j>=0;j--)
{
    if(a[j]>pivot)
    {
        i--;
        swap(a[i],a[j]);
    }
}
swap(a[i-1],a[s]);
return (i-1);

}
void quick_sort(int a[],int s,int e)
{
if(s>=e)
return;
int p=partition_element(a,s,e);
quick_sort(a,s,p-1);
quick_sort(a,p+1,e);
}
int main()
{
int a[100];
int n;
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
shuffle(a,0,n-1);
/* cout<<endl;
for(int i=0;i<n;i++)
cout<<a[i]<<" , ";*/

quick_sort(a,0,n-1);
  for(int i=0;i<n;i++)
    cout<<a[i]<<" ";

}
why i m getting runtime error in this code in 2 and 3 rd testcases

hey @anujkurmi, constraints are very high in the question please change the datatype int to long long int and increase size of array to 2*10^5

still i m getting run time error

hey @anujkurmi, can you share me the updated code saved in coding blocks ide.

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.