McqMate
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). |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet