1 2 3 4 5 6 |
|
The function
Fibonacci(N)
, given above, runs in
_
_
_
_
_
_
_
_
_
_
_
_
__
.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If we draw a tree for a fibonacci (N) , we will see that for the first level , there is one sub-branch corresponding to 2^0=1, for the second level there are 2^1=2 sub branches, for the third level, there are 2^2= 4 branches and the sequence keeps going like this, leading to the conclusion of 2^n.