Quicksort Randomised

getting TLE even after using randomised quicksort

I have edited your code… Try to submit it now…

i guess you use shuffle function inorder to pass the worst case(sorted array) and is the compexity remains nlogn by doing this?

Yes… because for the wrst case… the array given will be in sorted reverse fashion… So when u shuffle your given array and then pass it to the quicksort function… It would be of random nature and hence complexity will remain nlogn only…

Hey, i tried to write the code again like yours but still get TLE.
Is there any little tricks in this cases or i miss something please tell

Hey, please reply
koi toh ker do help

I have wrote error in your code as a comment … Pls see to this code…