Question: 2.6. Trace the execution of merge sort, Algorithm 2.4, on the following inputs (a) [ 41, 11, 37 ] (b) [ 11, 31, 41, 23,

2.6. Trace the execution of merge sort, Algorithm 2.4, on the following inputs

(a) [ 41, 11, 37 ] (b) [ 11, 31, 41, 23, 29, 43, 17, 37 ] How many comparisons does merge sort perform on each of the inputs (a) and (b)? How many exchanges? (c) How many times does merge sort call the merge procedure when sorting a list a1, a2, . . . , a11 of 11 integers? Give the exact number. (d) How many times does merge sort call the merge procedure when sorting a list a1, a2, . . . , an of n > 0 integers? Give an exact expression in terms of n.

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!