Question: 4 a ) Use merge sort to sort 6 , 5 , 1 7 , 1 5 , 1 6 , 2 0 , 1
a Use merge sort to sort into increasing order. Show all the steps in the algorithm draw the trees as shown in classBinary Trees
b What is the number of comparisons used in the merge algorithm shown in class to merge the two lists: ; and
c In the merge algorithm, two lists in increasing order are merged into one longer list of increasing order. Suppose two sorted lists are merged, one has elements, the other has What is the least possible number of comparisons, and when does that occur? What is the maximum possible number of comparisons?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
