Given a knapsack that can only carry a certain weight, determine which items to put in the knapsack in order to maximize their combined value.