Examlex

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) ) ;
}
}


Definitions:

Related Questions