Question: 2. Oliy S6 I. (15 points) Consider the array A = (900, 200, 700, 4601250, 300, 40). (a) (10 points) Illustrate the execution of the

 2. Oliy S6 I. (15 points) Consider the array A =

2. Oliy S6 I. (15 points) Consider the array A = (900, 200, 700, 4601250, 300, 40). (a) (10 points) Illustrate the execution of the algorithm MERGE SORT on A. You only need to show how the array will be split into subarrays all the way until the end, and then how the subarrays will be merged back. (b) (5 points) After the call to MERGE SORT in part (a), the array A is sorted. Suppose that BINARY SEARCH is called afterwards on A with key = 150. Which elements of A will be compared to key? List the elements themselves, NOT their indices. For both parts above, when computing the index of the middle ele- mont, make sure_you add the two boundary indices and divide by 2 integepdtvision. 4 5 U

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!