It’s no fun implementing QuickSort unless you can force it out of its blister-fast, O(n log n) speed and humiliate it with its worst-case, O(n^2) runtime. So that’s what I set out to do. My naive partition simply pivots around the low item, but my randomized partition defeats the sucky inputs by choosing a random [...]

### Advertisement

### Categories