Saturday, April 30, 2022

Fibonacci Sequence in Technical Interviews

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

[Paid member, flash card]  Fibonacci sequence during interviews and insights explained here. 

Here's a preview of the solution on Medium

No comments:

Post a Comment