Clarify number of calls
This commit is contained in:
parent
403f2300c3
commit
5e08fd3ded
|
@ -174,10 +174,10 @@ Hence, the call $\texttt{g}(n)$ causes the following calls:
|
|||
\begin{tabular}{rr}
|
||||
parameter & number of calls \\
|
||||
\hline
|
||||
$\texttt{g}(n)$ & 1 \\
|
||||
$\texttt{g}(n-1)$ & 2 \\
|
||||
$n$ & 1 \\
|
||||
$n-1$ & 2 \\
|
||||
$\cdots$ & $\cdots$ \\
|
||||
$\texttt{g}(1)$ & $2^{n-1}$ \\
|
||||
$1$ & $2^{n-1}$ \\
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
Based on this, the time complexity is
|
||||
|
|
Loading…
Reference in New Issue