Computer Science, Mathematics, Learning, Learning To Code, Code.
of dynamic programming is to store redundant work in some sort of memory or cache. Most of the time, this is done with an array or a hashmap. Going back to the previous example, what if when we figured out fib(2), we stored the value of fib(2) in an array! This way, if we have to calculate fib(2)