Skip to content

Commit 3a3e778

Browse files
authored
Update longest-happy-prefix.cpp
1 parent 6a07279 commit 3a3e778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/longest-happy-prefix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Solution2 {
4141
suffix = (suffix + (s[i] - 'a') * power % M) % M;
4242
power = (power * D) % M;
4343
if (prefix == suffix) {
44-
// we assume M is a very large prime without collision
44+
// we assume M is a very large prime without hash collision
4545
// assert(check(i + 1, s));
4646
result = i + 1;
4747
}

0 commit comments

Comments
 (0)