Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

Recurrence relation - how to find it for a function? Assume that n is the number of elements of A[first, . . . , last], that is, n = last − first + 1. Algorithm jelly(A, first, last) if (n < 8) then return A[first] + A[last] third ← (2 * first + last) / 3 return jelly(A, first + 3, last - 2) * jelly(A, first, third)

OpenStudy (anonymous):

If you mean recurrence as in recursion then you need to think of both the n-1 and base case. I would suggest trying to think of what the base case is and then the next case etc. If you cannot do this then the problem cannot be solved by recursion.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!