When selecting a pivot value, a simple thing to do is to always pick from the same place in the partition. If we use this approach, does it matter whether we always pick from the first position in the partition, the last position in the partition, or the middle position in the partition?

It is much better to pick the middle value
  • It is much better to pick the first value
  • It is much better to pick the last value
  • It doesn't really matter, they are all equally good or bad

If you pick the first or last one, then sorted input will give the worst case performance.

If you pick the middle value, then it is still possible to get worst-case performance.

But to do so requires a very specific and unusual permuation that will normally occur very rarely.

If all permuations were equally likely, then it wouldn't matter. But in practice, the sorted input is much more likely to occur.