Quick sort randomized


tell me error in this code

I modified your code a bit.


I removed your shuffle function and instead added the part given in lines 28-30.
I also changed your pivot function and took the array’s end element as pivot. It is easy to understand this way.

@Love Please mark your doubt as resolved if you are satisfied.