Test case 0& 1 are not passing


kindly correct my code and tell where i am going wrong asap

Hi @pradumnshukla,
first of n can be greater than 100. so change the size of array accordingly.
but u will find that u will still get tle in one test case.
So, inorder to avoid that, use randomised quick sort.
Hope dis helps.

what is randomised quick sort

the concept which is explained in the video of quick sort i have applied that… WHT IS RANDOMISED QUICK SORT

@pradumnshukla,
just add dis
srand(time(NULL));
int random = low + rand() % (high - low);
swap(arr[random], arr[high]);
before executing quick sort.
randomised just means to swap any element with the end element in order to avoid work case possibility

sir cant u just send where to add its the third time i am writing to you…just edit my code and send… I am unable to get it where to add this thing which you have sended in the code and what all variables to declare just edit the code and please send

sir please resolve the doubt

Hi @pradumnshukla,


Here is ur updated code.
Please Refer to dis
Sorry for d inconvenience caused.

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.