Question: Question 1 [ 1 0 marks ] ( a ) ( i ) The Mergesort algorithm is given in Appendix A ( i ) .

Question 1[10 marks](a)(i) The Mergesort algorithm is given in Appendix A(i). Using the list L =108,36,45,72,113,67,75,15 as your input, demonstrate how the Mergesort algorithm would sort the list. [3 marks](ii) Describe the conditions under which the Algorithm Mergesort will behave at its worst. Give an example of a list which will result in the worst case behavior of the algorithm Mergesort. Justify your answer. [2 marks](iii) The Algorithm Mergesort calls the Algorithm Merge given in Appendix A(ii). Obtain the computational complexity for Algorithm Merge. [2 marks](iv) Let C(n) be the number of key comparisons required to execute Algorithm Mergesort on a list of n elements. Write a recurrence relation for the number of comparisons made by the algorithm in the worst case. [1 mark](v) Using the Master Theorem or otherwise, determine the efficiency class of Algorithm Mergesort. [2 marks]

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!