Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions