Question: what is the correct answer. The following algorithm computes the Fibonacci value for n: int fibonacci(n : int) { if (n = 1) return n;

what is the correct answer.
The following algorithm computes the Fibonacci value for n: int fibonacci(n : int) { if (n = 1) return n; return fibonacci(n-1) + fibonacci(n-2); What is a reasonable definition of the corresponding recurrence relation T(n)? O Tin) = Tin-1) Tin-2) + cor cirn = 1 0 T(n) = T(2n) + c or cln - 1 Tn) = Tin-1)+Tin-2) + cordif n = 1 ( T) = Tt - 1+ 1-2 + C = 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
