re: Knapsack problem algorithms for my real-life carry-on knapsack VIEW POST

re: Love your post, great read! One suggestion for your calculation though. If it is that important to bring your laptop (and the cable and charger of...

Yep, this. I was going to comment about items that change in importance based on destination. For example, her gloves are not showing up in the results set, however they're mandatory if she's going to a very cold country! Her sunglasses on the other hand are always present, yet they're not that necessary if she's going to the UK ;) your approach fixes these issues of "must have items for this trip"


In short, yes. To carry the analogy through I left all the items in, but as a practical exercise, removing the mandatory ones from the calculation makes more sense. :)

code of conduct - report abuse