Coding Fibonacci Seq for Google Interviews vs Codecademy Exercises

Uniqtech
Interview Buddy
Published in
2 min readDec 22, 2017

--

Fibonacci is one of the most fundamental coding exercises presented to beginners. Yet it is also a great example to show why Google cares so much about optimized algorithms. The seemingly simple fib exercise can test advanced coding concepts like dynamic programming and recursion related stack overflow.

So what about Fibonacci sequence? When fibonacci sequence is introduced, it is almost always a perfect example of recursion (as seen on Codecademy and Khan Academy).

def fibonacci(n):
if(n…

--

--