Skip to content

Commit 63c29a3

Browse files
committed
do daily
1 parent 95a5c6b commit 63c29a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

my-submissions/e2379.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def minimumRecolors(self, blocks: str, k: int) -> int:
3+
output = w = blocks[:k].count('W')
4+
for l, r in zip(blocks, blocks[k:]) :
5+
w += (r == 'W') - (l == 'W')
6+
output = min(output, w)
7+
return output

0 commit comments

Comments
 (0)