Fish Touching🐟🎣

Quicksort

Mar 22, 2023

Definition: Pick two elements from the array to be sorted (the pivots), partition the remaining elements into (i) those less than the lesser pivot, (ii) those between the pivots, and (iii) those greater than the greater pivot, and recursively sort these partitions.


*Note: Dual-pivot quicksort is consistently faster than quicksort* in practice, although classical analysis suggests that it should be slower. *Why Is Dual-Pivot Quicksort Fast? , arXiv:1511.01138 v2 28 Sep 2016.