3 ms·
That's exactly how I teach dynamic programming. First solve it recursively, then add memoization (I call that top-down). Then notice that recursion and memoiza
by JohnKemeny 3y ago
That's exactly how I teach dynamic programming. First solve it recursively, then add memoization (I call that top-down).
Then notice that recursion and memoization has some overhead, and construct the table from bottom-up, remove the recursive call, and voila, dynamic programming.
- throwaway2037 3y agoThis sounds like a promising teaching technique. Do you have a slide deck to share? I am sure HN crowd would be interested to read.
- globular-toast 3y agoIt's in TFA...