Fibonacci Python Quick Reference
When studying for programming interview, always a good idea to have fibonacci handy. Here’s a gist of the recursive, memoized recursive and bottom_up approaches for easy reference. Includes a test for each, intended to be run with pytest
Bottom_up approach is cleanest and uses less memory (ie. not going to run into stack overflow storing a ton of recursive functions). Not sure why we even bother to learn the recursive solutions other than a though exercise…