1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. What is the space complexity of the recu...
Q.

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

A. o(1)
B. o(n)
C. o(n2)
D. o(n3)
Answer» A. o(1)
Explanation: the recursive implementation doesn’t store any values and calculates every value from scratch. so, the space complexity is o(1).

Discussion