Question: Let T ( n ) be the cost in steps of the following recursively defined function, where the input size is n = k -

Let T(n) be the cost in steps of the following recursively defined function, where the input size is n = k-j+1. Assume that localFnc() acts on entries A[j]... A[k] inclusive, and that the cost of calling this function with input size n is n2.
1// pre: 1<= j,k < A.length
2 void recursiveFnc(int[] A, int j, int k)
3 if (j < k-3)
4 localFnc(A, j, k)
5 recursiveFnc(A, j,(4*j+k)/5)
Under our updated Close Enough Policy, which of the following recurrence relations is satisfied by T(n)? You can assume that n =5r for some positive integer r.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!