Classic 0-1 knapsack: given n items with weights and values and a bag of capacity W, choose a subset of items, each at most once, to maximise total value without exceeding W. Return the maximum value.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.