Question: In quicksort, instead of selecting three elements, as is done for median-of-three partitioning, suppose we are willing to select nine elements, including the first and last, with the other seven equally spaced in the array.
a. Write code to implement median-of-nine partitioning.
b. Consider the following alternate to median-of-nine: group the items into three groups of three. Find the medians of the three groups. Then use the median of those medians. Write code to implement this alternative, and compare its performance to median-of-nine partitioning.