Minimum Cost with Bundles/Offers

Asked at Amazon · Coding Questions · Difficulty: Medium

A shop sells `n` kinds of items at unit prices and also offers bundles. Each bundle contains a fixed quantity of every item for one bundle price. You must buy exactly the quantities you need, using any mix of bundles and single items, and you may use the same bundle as many times as you like. Find the lowest total cost.

Loading the problem…