A: array of numbers low: lowest index of array (0) mid: index of array A, low

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

A: array of numbers low: lowest index of array (0) mid: index of array A, low

Post by answerhappygod »

A Array Of Numbers Low Lowest Index Of Array 0 Mid Index Of Array A Low Mid High High Highest Index Of Array A 1
A Array Of Numbers Low Lowest Index Of Array 0 Mid Index Of Array A Low Mid High High Highest Index Of Array A 1 (88.76 KiB) Viewed 27 times
A: array of numbers low: lowest index of array (0) mid: index of array A, low <mid high high: highest index of array A (Number of elements -1) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 function F(A, low,mid, high) for 0 < i <=mid B=A for 0 < i < (high-mid) C=A[i+mid+1] i=0; j=0; k=8 while( i <=mid AND j<(high-mid)) if(B<C[j]) A[k)=B i=i+1 else A[k]=C[j] j=j+1 k=k+1 if(i>mid) for j <= m high-mid A[k]=C[m] k=k+1 if(j >= (high-mid)) for i <= m <mid+1 A[k] =B[m] k=k+1 end functio 18 19 20 21 22 23 For the following input data: A: [4, 21, 35, 1, 49, 54, 63, 77] low: 0 mid: 2 high: 7 What is the final content of array A after executing algorithm F? (1,4, 21, 35, 49) [77, 63, 54, 49, 35, 21, 4, 1] ООООО none of the others [1, 4, 21, 35, 49, 54, 63,77] 14, 21, 35, 1, 49, 54, 63, 77
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply