Solved

Consider the Recursive Version of the Fib Method from the Textbook

Question 93

Multiple Choice

Consider the recursive version of the fib method from the textbook shown below: public static long fib(int n)
{
If (n <= 2)
{
Return 1;
}
Else
{
Return fib(n - 1) + fib(n - 2) ;
}
}
How many total recursive calls (not counting the original call) to fib will be made from the original call of fib(7) ?


A) 12
B) 24
C) 30
D) 32

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions