Answered step by step
Verified Expert Solution
Question
1 Approved Answer
show the working of the merge procedure used by the merge sort on the array A = {, -6, 5, 8, 9, 10, -3, 7,
show the working of the merge procedure used by the merge sort on the array A = {, -6, 5, 8, 9, 10, -3, 7, 9, 13, 14, } between indices 1 and 8, i.e., p=1, q=4, r=8. You need to show the content of the array L, R and A between indices 1 and 8 after each iteration of the loop at lines 12-17 in the merge proceudre.
MERGECA, p, q,r) 3 create arrays LI1. . ni 1 and R[1 . . n2+1] 4 for i 5 6 for j 1 to n2 7 l to n do L[i] 10 i 12 for kp to r 13 do if L[i1RLjl then A[k] L[i] 15 16 17 else A[k] -R[j]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started