3 ms·
I've grokked it a couple of times, implemented solutions for some problems (knapsack, matrix multiplication, etc...), but I always keep forgetting...
by zerr 9y ago
I've grokked it a couple of times, implemented solutions for some problems (knapsack, matrix multiplication, etc...), but I always keep forgetting...
- fokinsean 9y agoYou're not alone! Went down the whole nine yards in college, and come exam time knapsack was toast! However I would definitely struggle with it today. My best simplistic explanation is that it is a method in which you cache values in order to not duplicate work. I then tell about the only example which I could still bang out on a white board, which is fibonacci with a cache. Oh yeah and another important detail is something something solving subproblems :p
- zerr 9y agoYes, divide-and-conquer where subproblems overlap.