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 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

https://medium.com/interview-buddy/re-learn-how-to-code-fibonacci-sequence-in-python-coding-interview-for-beginners-b6b47699604c



No comments:

Post a Comment