Question: Problem 1. Recall that, in merge sort, the merging step combines two sorted lists A1,A2 into one sorted list A. Suppose that A1 and A2

 Problem 1. Recall that, in merge sort, the merging step combines

Problem 1. Recall that, in merge sort, the merging step combines two sorted lists A1,A2 into one sorted list A. Suppose that A1 and A2 are (1,8,17,23,35,83) and (3,5,15,28,56), respectively. Describe the content of A right before the moment when 23 enters A. Problem 2. For the k-selection problem, suppose that the input is an array of 12 elements: (58, 23,98,83,32,24,18,45,85,91,2,34). Recall that our randomized algorithm first selects a number v, and then recursively solves the problem on a smaller array. Suppose that v=34 and k=10. What is the smaller array that we will recurse into

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!