Fibonacci function call tree
As illustrated here: the fib(5) function needs to call fib(3), and fib(2), fib(2), fib(1), f(0) many times, lots of recursions (calling it self).
Source: Berkeley CS61b1 https://inst.eecs.berkeley.edu/~cs61bl
[Paid member, flash card] Fibonacci sequence during interviews and insights explained here.
Here's a preview of the solution on Medium
Post a Comment