here's a vanilla implementation of Quicksort https://github.com/leonid-shevtsov/uni-programming/blob/mast...
and here's the function to generate data that causes the custom implementation to go O(n^2) https://github.com/leonid-shevtsov/uni-programming/blob/mast...