McqMate
Q. |
return fibo_terms[n] |
A. | o(1) |
B. | o(n) |
C. | o(n2) |
D. | exponential |
Answer» B. o(n) | |
Explanation: to calculate the nth term, the for loop runs (n – 1) times and each time a for loop is run, it takes a constant time. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet