Question: Answer the following questions about the RecMysterySort algorithm below. Input: A : array with n real numbers Input n: size of data Output: permutation of

 Answer the following questions about the RecMysterySort algorithm below. Input: A

Answer the following questions about the RecMysterySort algorithm below. Input: A : array with n real numbers Input n: size of data Output: permutation of data such that A[1]A[2]A[n] Algorithm: RecMysterySoct if n=2 then 3 if A[1]>A[2] then Swap A\{1] and A{2}. else if n>1 then first =[n/4] third =nfirst) RecMysterySort(A[I third]; RecMysterySort(Afirst.n]). RecMystery Rot(All third]); end 13 return A; a) [10 points] Write a recurrence that describes the worst case time complexity of RecMysterySort. Show your work. b) [5 points] Find the worst case time complexity of RecMysterySort. Show your work. c) [10 points] How does RecMysterySort compare to MergeSort and Insertionsort? Justify your answer. A table of approximate log values appears belowy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!