Maximum Reward Points With Decay

Asked at Amazon · Coding Questions · Difficulty: Medium

Buying an offer item gains its reward points, after which the reward of every other unbought item drops by 1 (never below 0). Each item is bought at most once. Return the maximum total reward points collectible.

Loading the problem…