DEV Community

Discussion on: Knapsack problem algorithms for my real-life carry-on knapsack

Collapse
 
shriharshmishra profile image
Shriharsh

Great article! introduced me to dynamic programming.

Sorry to be nitpicking - rows and columns should be interchanged in this statement -

"Create a matrix representing all subsets of the items (the solution space) with columns representing items and rows representing the bag's remaining weight capacity"

Collapse
 
victoria profile image
Victoria Drake

Congratulations, you've passed the secret hidden test and won a prize!

Seriously though good catch! I must have missed that several times. Guess you're the only one who read the article. :)

Thank you!

Collapse
 
shriharshmishra profile image
Shriharsh

The topic was dense to me and I am unknown to Go syntax, so I was reading slowing over several days and thinking about it :P