A couple of years ago I uploaded a 20 minute video to YouTube explaining how to solve the Knapsack problem using dynamic programming. In the video I used a Python script which was written by Pete Sutton and can be downloadedÂ here. I hope this continues to help students understand the dynamic programming solution to this problem!

Part One

Part Two

Part Three (Finding the Solution)

Did you have a script written out beforehand for this tutorial? Apart from the few moments of hesitation, it’s very well explained, I enjoyed it!

Haha no! Just made it up as I went along! Please you could barely tell lol!