Comment

Comment by NoThisIsMe

You're thinking of memoization, which is related to but distinct from DP. Memoization is "top down", DP is "bottom up". DP generally has better space complexity (memory requirements). For example, for a function that computers the Fibonacci sequence, space complexity with memoization is O(n), vs O(1) with DP.

https://en.wikipedia.org/wiki/Dynamic_programming#Fibonacci_...

parent NoThisIsMe 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton