Question: 3. We want to sort an array A[1.. using quicksort, where n is a power of 2. Suppose that at every recursive level of quicksort,

3. We want to sort an array A[1.. using quicksort, where n is a power of 2. Suppose that at every recursive level of quicksort, we split the array exactly in half (that is, the index q splits Alp..r into two subarrays Alp..q and Al+1r] with same number of elements (r-p+1)/2). What is the running time of quicksort in this case? Please express this running time in O-notation, using the best asymptotic bound you can find. Justify your answer Hint: What is the height of the recursive calls tree in this case?) If n is not a power of 2, does the best asymptotic bound on the running time for quicksort with this half-and-half split change
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
