922
5 Likes

DSA Crash Course [Part 67] - Fibonacci Approach

In this lesson, Alvin explains the fundamentals of dynamic programming by applying dynamic programming to fibonacci:

Write a function fib that takes in a number argument, n, and returns the n-th number of the Fibonacci sequence.

The 0-th number of the sequence is 0.

The 1-st number of the sequence is 1.

To generate further numbers of the sequence, calculate the sum of previou