Question: Using the mergesort pseudocode in our textbook, sort the numbers 5, 2, 7, 4, 8, 6, 3 in the ascending order. You should describe your

Using the mergesort pseudocode in our textbook, sort the numbers 5, 2, 7, 4, 8, 6, 3 in the ascending order. You should describe your answer as Figure 5.2 of our textbook. Note that our textbooks example has 8 numbers. However, this problem has 7 numbers. Thus, you should read the pseudocode carefully and identify how it sorts the 7 numbers.
ALGORITHM Merge(B[0.p - 1] C[0.q 1], A[0.p+q 1]) //Merges two sorted arrays into one sorted array WInput: Arrays B[0..p - 1] and C[O..q 1] both sorted lOutput: Sorted array AO..p+q -1] of the elements of B and C while i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
