Skip to content

Commit b4e0862

Browse files
committed
060125
1 parent 4dc19e1 commit b4e0862

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from typing import List
2+
3+
4+
# leetcode submit region begin(Prohibit modification and deletion)
5+
class Solution:
6+
def minOperations(self, boxes: str) -> List[int]:
7+
N = len(boxes)
8+
ans = [0] * N
9+
for i in range(N):
10+
for j in range(i + 1, N):
11+
if boxes[j]:
12+
ans[i] += (j - i)
13+
return ans
14+
15+
16+
# leetcode submit region end(Prohibit modification and deletion)
17+
18+
19+
class MinimumNumberOfOperationsToMoveAllBallsToEachBox(Solution):
20+
pass

0 commit comments

Comments
 (0)