HackerRank "Organizing Containers of Balls"

Swapping - is actually a useless mask to the sln of this problem. The invariance of this problem is, swapping doesn't change # of balls in each container. A further thought: actually, swapping means nothing to the final solution. We can simply do sorting and check # of balls against container capacity, one by one.

原文地址:https://www.cnblogs.com/tonix/p/6845033.html