Minimum Cost to Make Package Sizes Unique

Asked at Amazon · Coding Questions · Difficulty: Hard

An array `size` has duplicate values. You may increase `size[i]` by 1 any number of times; each `+1` on index `i` costs `cost[i]`. Find the minimum total cost to make all values distinct.

Loading the problem…