My code is correct and is working on IDE , but here I ’ m not able to compile and submit the code . compile and submit buttons are not responding
Here is my code
/#include
using namespace std;
int partition(int *a,int s,int e){
int i=s-1;
int j = s;
int pivot = a[e];
for( ;j<e;j++){
if(a[j]<=pivot){
i++;
swap(a[i],a[j]);
}
}
///Bring the pivot element to its sorted position
swap(a[i+1],a[e]);
return i+1;
}
void quickSort(int *a,int s,int e){
if(s>=e){
return;
}
int p = partition(a,s,e);
quickSort(a,s,p-1);
quickSort(a,p+1,e);
}
int main(){
int n , a[1000];
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
quickSort(a,0,n-1);
for(int i=0;i<n;i++){
cout<<a[i]<<" ";
}
return 0;
}