Question: 2. (20%) Answer the following questions about internal sorting algorithms. (a) Given the sequence of elements 12, 54, 88,3, 25, 72, 16, 31, 25, 43,

 2. (20%) Answer the following questions about internal sorting algorithms. (a)

2. (20%) Answer the following questions about internal sorting algorithms. (a) Given the sequence of elements 12, 54, 88,3, 25, 72, 16, 31, 25, 43, 64, 3 in that order. Using iterative merge sort, show the result of each pass until only one sorted list left. How many passes do you need? (b) For the same initial sequence of elements as (a), do the same as in (a) except using recursive merge sort. How many passes do you need? (c) For the same initial sequence of elements as (a), do the same as in (a) except using natural merge sort. How many passes need? (d) For the same initial sequence of elements as (a), use heap sort to sort the elements in the following way. First draw the initial max heap. Then for each pass, show the sorted elements and the updated max heap at the end of do you the pass

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!