Question: Problem 5 (10 points). Analysis the expected running time of the following randomized algorithm for sorting. You may assume that all elelments in A are

Problem 5 (10 points). Analysis the expected running time of the following randomized algorithm for sorting. You may assume that all elelments in A are distinct function combined-sort (array A[1-n|) if n - 1, then return A; select k from {1,2,.. ,n^ uniformly at random; compute AL as the list of elements in A that are smaller than Ak]; compute AR as the list of elements in A that are larger than A[k]; Xp = merge-sort (AL); = merge-sort (AR); return (X.Ak] , Xe). end function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
