English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

If the Fibonacci number is defined recursively as F(n) = nnFnFnotherwise{0n=01n=1F(n-1)+ F(n-2)otherwise to evaluate F(4), how many times F() is applied? - Computer Science

Advertisements
Advertisements

Question

If the Fibonacci number is defined recursively as F(n) = `{(0, "n" = 0), (1, "n" = 1), ("F"("n" - 1),+  "F"("n" - 2) "otherwise"):}` 
to evaluate F(4), how many times F() is applied?

Options

  • 3

  • 4

  • 8

  • 9

MCQ

Solution

9

shaalaa.com
Recursion
  Is there an error in this question or solution?
Chapter 8: Iteration and recursion - Evaluation - Section - A [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 8 Iteration and recursion
Evaluation - Section - A | Q 5. | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×