In most texts, the pivot is selected as the first or the last element of each subarray . In such a
case, a worst case sequence for Quicksort is the sorted array itself . We suspect that the ease
of identifying and constructing this particular sequence is a main reason why most texts use
such a pivot choice. In [1], however, Wirth chooses the pivot as the middle element of the
subarray in each pass and asserts that the average performance improves slightly (by a
constant factor) as a result of such a choice . In the following, we give a Pascal version o f
the Quicksort procedure where the pivot is always the middle element of the subarray to b e
sorted .