| Choosing the pivot the preferred method of choosing a pivot is the median of three approach, which takes the median value between the first, last and middle values in the array
this approach has the advantage that it is fairly quick and simple, and does not degrade when the input is sorted or anti-sorted |