1
0
mirror of https://github.com/SunnyQjm/algorithm-review.git synced 2026-06-03 08:16:43 +08:00

Update 1_longest-palindromic-substring.py

This commit is contained in:
2020-06-21 10:32:15 +08:00
committed by GitHub
parent 6f4c145338
commit ba3c315fde
+1 -1
View File
@@ -42,7 +42,7 @@ class Solution:
for i in range(2, len(s)):
for j in range(0, len(s) - i):
if dp[j + 1][j + i - 1] and s[j] == s[j + i]:
find, resultStart, resultEnd, dp[j][j + i] = True, j, j + i + 1, True
resultStart, resultEnd, dp[j][j + i] = j, j + i + 1, True
return s[resultStart: resultEnd]