Top Down Memoization

Top

Top Down Memoization. Right now with memoization we need an object the size of n can we do it without the object. In top down you use recursion along with memoization.

Programming For Engineers In Python Lecture 13 Shit
Programming For Engineers In Python Lecture 13 Shit

The method of memoization allows you to save sub problems in caches so you can only calculate it once. In top down you use recursion along with memoization. So here our function will have two values.

Due to this the time complexity is decreased but the space complexity is.

What i have learnt is that dynamic programming dp is of two kinds. Memoization and dp. Do recursion until reach base case then fill array while returning. Top down approach is taking a complex system and breaking it down to the simple individual components to gain a better understanding of the inner layers.