Question: I need help. 4. (5 points code in write-up. 5 points code in m-file) Write Matlab code for Algorithm 9 in section 5.4. This algorithm
I need help.

4. (5 points code in write-up. 5 points code in m-file) Write Matlab code for Algorithm 9 in section 5.4. This algorithm uses the merge function to implement the mergesort algorithm. ALGORITHM9 A Recursive Merge Sort. procedure mergesort L = a1,.. , an ) ifn1 then ?1 :=a1.a2 ,@m L := merge(mergesort(L1), mergesort(L2)) L is now sorted into elements in nondecreasing order) 5. (5 points results) Test your code by running this and verifying that it returns a correctly sorted list unsorted = [ 10 8 9 1 4 6 8 2 2.501 sorted- mergesort (unsorted)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
