Q.

What is the time complexity of the recursive implementation used to find the nth fibonacci term?

A. o(1)
B. o(n2)
C. o(n!)
D. exponential
Answer» D. exponential
Explanation: the recurrence relation is given by fibo(n) = fibo(n – 1) + fibo(n – 2). so, the time complexity is given by:
2.4k
0
Do you find this helpful?
6

Discussion

No comments yet