DEV Community

Discussion on: Solving the knapsack problem in PostgreSQL

Collapse
 
ftisiot profile image
Francesco Tisiot

Hi, 20 is the limit on WEIGHT, for which we are ok since 👕 T-Shirt (weight 10) + 🎩 Hat (weight 5) + 🧦 Socks (weight 3). The resulting VALUE is 32 because of 👕 T-Shirt (value 7) + 🎩 Hat (value 15) + 🧦 Socks (value 10)