sort using quicksort with median-of-three partitioning and cutoff of using the quicksort implementation in this determine the running time of quicksort for sorted input reverse-ordered input random input repeat exercise when the pivot is chosen as the first element the larger of the first two distinct elements random element the average of all elements in the set for the quicksort implementation in this what is the running time when all keys are equalb suppose we change the partitioning strategy so that neither nor stops when an element with the same key as the pivot is found what fixes need to be made in the code to guarantee that quicksort worksand what is the running time when all keys are equalc suppose we change the partitioning strategy so that stops at an element with the same key as the pivotbut does not stop in similar case what fixes need to be made in the code to guarantee that quicksort worksand when all keys are equalwhat is the running time of quicksort suppose we choose the element in the middle position of the array as pivot does this make it unlikely that quicksort will require quadratic timeconstruct permutation of elements that is as bad as possible for quicksort using median-of-three partitioning and cutoff of the quicksort in the text uses two recursive calls remove one of the calls as followsa rewrite the code so that the second recursive call is unconditionally the last line in quicksort do this by reversing the if/else and returning after the call to insertionsort remove the tail recursion by writing while loop and altering left continuing from exercise after part ( ) perform test so that the smaller subarray is processed by the first recursive callwhile the larger subarray is processed by the second recursive call remove the tail recursion by writing while loop and altering left or rightas necessary prove that the number of recursive calls is logarithmic in the worst case suppose the recursive quicksort receives an int parameterdepthfrom the driver that is initially approximately log modify the recursive quicksort to call heapsort on its current subarray if the level of recursion has reached depth (hintdecrement depth as you make recursive callswhen it is switch to heapsort