How many function calls are needed for $T(12)$?

37 Views Asked by At

Suppose, a function $T(N)$ is defined as follows :

$T(N)=\begin{cases} & \text{ $0$ }\ ; N< 1 \\ & \text{ $1$ }\ ; N= 1 \\ & \text{ $T(N-2) + T(N-3)$ }\ ; N> 1 \end{cases}$

Then, $T(N)$ = ?

1

There are 1 best solutions below

0
On

To compute $T(12)$, the values of $T(10),T(9),\ldots,T(1),T(0),T(-1)$ will need to be computed, and no others.