While submitting "MLE" is showing

#include
using namespace std;
int pt(int *a,int s,int e){
int i=s-1;
for(int j=0;j<=e;j++){
if(a[j]<=a[e]){
i++;
swap(a[i],a[j]);
}
}
swap(a[i+1],a[e]);
return i+1;
}

void qs(int *a,int s,int e){
if(s>=e){
return;
}
int index=pt(a,s,e);
qs(a,s,index-1);
qs(a,index+1,e);

}
int main() {
int n;cin>>n;int a[1000];
for(int i=0;i<n;i++){
cin>>a[i];
}
qs(a,0,n-1);
for(int x=0;x<n;x++){
cout<<a[x]<<" ";
}

return 0;

}

hi @yashtripathi6969_0cd127807d833066 correction in this line
for(int j=s;j<e;j++){ // not 0 from s and i<e not <=

but this will still give tle coz this question can be done by randomised quick sort not the simple quick sort

test case 1 is showing warning