Skip to content

Commit 4365231

Browse files
authored
Update number-of-subarrays-that-match-a-pattern-i.py
1 parent 2a99c25 commit 4365231

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/number-of-subarrays-that-match-a-pattern-i.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def KMP(text, pattern):
3434

3535
return sum(1 for _ in KMP((cmp(nums[i+1], nums[i]) for i in xrange(len(nums)-1)), pattern))
3636

37+
3738
# Time: O(n * m)
3839
# Space: O(1)
3940
# brute force

0 commit comments

Comments
 (0)