it gives TLE . please suggest the required changes.
Randomize quick sort
@Anushka_Jha You are not required to shuffle entire array . You can just swap the random values inside swap function. No need to swap entire array. Use this inside shuffle.
srand(time(NULL));
int random = low + rand() % (high - low);
// Swap A[random] with A[high]
swap(arr[random], arr[high]);
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.
i made the suggested changes but its not working . could you please review it again