median of three values strategy
The median of three has you look at the first, middle and last elements of the array, and choose the median of those three elements as the pivot. To get the “full effect” of the median of three, it’s also important to sort those three items, not just use the median as the pivot — … Read more