Skip to content

Commit ff60ffb

Browse files
authored
Update number-of-equal-count-substrings.py
1 parent 78665ed commit ff60ffb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/number-of-equal-count-substrings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def equalCountSubstrings(self, s, count):
1414
for i, c in enumerate(s):
1515
cnt[c] += 1
1616
equal_cnt += (cnt[c] == count)
17-
if count*l <= i:
17+
if i >= count*l:
1818
equal_cnt -= (cnt[s[i-count*l]] == count)
1919
cnt[s[i-count*l]] -= 1
2020
result += (equal_cnt == l)

0 commit comments

Comments
 (0)