An intro to Algorithms (Part II): Dynamic Programming

Meet Zaveri
Apr 30 · 6 min read
Photo by Helloquence on Unsplash

Those who cannot remember the past are condemned to repeat it. ~Dynamic Programming

Diving into dynamic programming

An approach to solve: top-down vs bottom-up

The visualization displayed in the image is not correct acc. to theoretical knowledge, but I have displayed in an understandable manner

Memoization: Don’t forget

The obvious reason for the recursive algorithm’s lack of speed is that it computes the same Fibonacci numbers over and over and over.

From Jeff Erickson’s notes CC:
In a top-down manner.

Tabulation: Filling up in tabular form

From Jeff Erickson’s notes CC:
Pseudocode with Fibonacci tree

Looking back in history

Wrapping up

This is no longer updated. Go to instead

Meet Zaveri

Written by

Frontend Engineer with a keen interest in Computer Science. Passionate about JavaScript, React Ecosystem and OSS.

This is no longer updated. Go to instead