1769 leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/ boxes배열이 있고, 1이면 공이 있고 0이면 공이 없다. i번째 배열에 모든 공을 모으려면 몇번 움직여야 하는지 합을 리턴하면 된다. 근데 당연히 무식하게 O(n^2)으로 하는게 의도가 아니라 O(n)으로 가능하다. 좋은 해설 : leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/discuss/1075895/Easy-Python-beats-100-time-and-space class Solution(object): def minOperations(self..