Minimum Moves to Even Out Box Piles

Asked at Amazon · Coding Questions · Difficulty: Medium

There are `n` piles with `boxes[i]` boxes. One operation moves a single box from one pile to another. Return the minimum number of operations to make the piles as even as possible (every pile within 1 of the average).

Loading the problem…