Solved

How Many Recursive Calls to the Fib Method Shown Below

Question 94

Multiple Choice

How many recursive calls to the fib method shown below would be made from an original call to fib(4) ? (Do not count the original call) public int fib(int n)
{ // assumes n >= 0
If (n <= 1)
{
Return n
}
Else
{
Return (fib(n - 1) + fib(n - 2) ) ;
}
}


A) 1
B) 2
C) 4
D) 8

Correct Answer:

verifed

Verified

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

Related Questions