Question: 3. Consider the following function: Func3(4, i, j) * A is an array of at least j integers 1 if (i >j) then return (0);

3. Consider the following function: Func3(4, i, j) * A is an array of at least j integers 1 if (i >j) then return (0); 2ntji+l; 3k + Random(n-1); 480; 5 forti toj do 6 Alrl + Arl-Ai-AG: 7sts + Arl; /*n=number of elements from i to j */ & end 9sts + Func3(A, i, i+k-1); 10 Sts + Func3(A, itk, j); 11 return (s): (a) What is the asymptotic worst case running time of Func3? (b) What is the asymptotic expected running time of Func3? Justify your solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
