Skip to content

Commit 7f62508

Browse files
authored
Update palindrome-partitioning-iv.py
1 parent 3d804cc commit 7f62508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/palindrome-partitioning-iv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def modified_manacher(s):
2626
C, R = i, i+P[i]
2727
for i in prefix:
2828
for j in suffix:
29-
left, right = i+P[i]+1, j-P[j]-1
29+
left, right = i+1+P[i], j-1-P[j]
3030
mid = left + (right-left)//2
3131
if P[mid] >= mid-left:
3232
return True

0 commit comments

Comments
 (0)