BILL interview question

Variation of a Knapsack Problem