Quicksort randomized

Given an array A, of N elements. Sort the array using quicksort algorithm.(Note : Use randomized quicksort, otherwise worst case will not pass).

solution link: https://ide.codingblocks.com/s/279547

what modification has to be made for a randomized quicksort code?

@1799sanya sorry for the delay
srand(time(NULL));

//taking pivot as random element of the array use inbuilt rand function 

//generating a random number between beginning and ending index
int pivotIndex = be + rand() % (end - be+1);
int pivot;
pivot = a[pivotIndex];

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.