Skip to content

Commit e496b14

Browse files
authored
Update match-substring-after-replacement.py
1 parent 5b3fa69 commit e496b14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Python/match-substring-after-replacement.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Time: O(n * s)
2-
# Space: O(m)
1+
# Time: O(n * k), n = len(s), k = len(sub)
2+
# Space: O(m), m = len(mappings)
33

44
import collections
55

@@ -27,8 +27,8 @@ def check(i):
2727
return any(check(i) for i in xrange(len(s)-len(sub)+1))
2828

2929

30-
# Time: O(n * s)
31-
# Space: O(m)
30+
# Time: O(n * k), n = len(s), k = len(sub)
31+
# Space: O(m), m = len(mappings)
3232
import collections
3333

3434

0 commit comments

Comments
 (0)