I have to code my own Quicksort algorithm. It has to select the pivot by choosing the median of five items in the partition (start, quarter way, halfway, three quarter and last locations of partition).

Can anyone help?