Question: Question 9 Give the recursion tree for a call to MergeSort with the input list ( 8 , 4 , 1 2 , 1 6

Question 9
Give the recursion tree for a call to MergeSort with the input list (8,4,12,16,3,10,2,14). For each call to MergeSort, give: The input list to that call, the input and output for the recursive calls made, and the final output list for that call.
Question 10
a) The input list of binary search is (3,7,12,16,22,29,34,43,48,60) For each target value \( x \) given below, give the values for variables low and high for each call to BinarySearch. Then give the final value return value by the function.
i.\(\mathrm{x}=16\)
ii.\( x=29\)
b) The input to a recursive binary search algorithm is target \( x \) and list \( L \) :
\[
\mathrm{L}\equiv(4,7,12,15,20,25,30,35,40,45)
\]
The algorithm sets the variables low and high so that if \( x \) occurs in the list, then \( x \) is guaranteed to occur somewhere in locations low through high. What updates should be made to the low and/or high variables to maintain the correct properties? Explain your reasoning.|
i.\(15
Question 9 Give the recursion tree for a call to

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 Programming Questions!