You'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
Comments
You'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
Yes, divide-and-conquer where subproblems overlap.