Sort an array of 10,000 elements using the quick sort algorithm as follows:
a) sort the array using pivot as the middle element of the array
b) sort the array using pivot as the median of the first, last, and middle elements of the array
c) sort the array using pivot as the middle element of the array. however, when the size of any sublist reduces to less than 20, sort the sublist using an insertion sort.