M

Mr. Dubey • 52.26K Points
Coach

Q. Which of the following recurrence relations can be used to find the nth fibonacci number?

(A) f(n) = f(n) + f(n – 1)
(B) f(n) = f(n) + f(n + 1)
(C) f(n) = f(n – 1)
(D) f(n) = f(n – 1) + f(n – 2)
Correct : Option (D)

Explanation:
 the relation f(n) = f(n – 1) + f(n – 2) can be used to find the nth fibonacci number.

Share

Discusssion

Login to discuss.

Loading Comments....