TLE error comes please check the code

#include<bits/stdc++.h>
using namespace std;
void suffle(long long * a,long long s,long long e)
{
srand(time(NULL));
long long j;
for(long long i=e;i>0;i–)
{
j=rand()%(i+1);
swap(a[j],a[i]);
}
}
long long find_pivot(long long * a,long long s,long long n)
{
long long j=0;
for(long long i=0;i<n-1;i++)
{
if(a[i]<a[n-1])
{
// cout<<j<<endl;
swap(a[i],a[j]);
j++;
}
}
swap(a[n-1],a[j]);
return j;
}
void quicksort(long long * a,long long s,long long n)
{

if(s<n)
{
	
long long pivot=find_pivot(a,s,n);
//	cout<<s<<" "<<n<<" "<<pivot<<endl;
quicksort(a,s,pivot);
quicksort(a,pivot+1,n);	

}}
int main() {
long long n;
cin>>n;
long long a[n];
for(long long i=0;i<n;i++)
cin>>a[i];
suffle(a,0,n-1);
quicksort(a,0,n);
for(long long i=0;i<n;i++)
cout<<a[i]<<" ";
return 0;
}
the link is :

since the constraints are large quick sort has worst case complexity O( N ^2)
try some other sort

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.