Skip to content

Commit 6a07279

Browse files
authored
Update longest-happy-prefix.py
1 parent 1bf5b5b commit 6a07279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/longest-happy-prefix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def check(l, s):
4646
suffix = (suffix + (ord(s[len(s)-(i+1)])-ord('a'))*power) % M
4747
power = (power*D)%M
4848
if prefix == suffix:
49-
# we assume M is a very large prime without collision
49+
# we assume M is a very large prime without hash collision
5050
# assert(check(i+1, s))
5151
result = i+1
5252
return s[:result]

0 commit comments

Comments
 (0)