Consider the following recursive definition of fib: fib(n) := if n = 0 then 1…
PYQ GATE 1991
Consider the following recursive definition of fib:
fib(n) := if n = 0 then 1
else if n = 1 than 1
else fib(n - 1) + fib(n - 2)
The number of times fib is called (including the first call) for an evaluation of fib(7) is __________
Attempted by 43 students.
Sign up free to check your answer
Sign up freeLoading lesson…

