Skip to content

Commit d74506a

Browse files
authored
Update longest-palindrome-after-substring-concatenation-i.py
1 parent f38b7b7 commit d74506a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/longest-palindrome-after-substring-concatenation-i.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ def longest_palindrome(s):
3838
for i in xrange(len(s)):
3939
for j in xrange(len(t)):
4040
dp[i+1][j+1] = dp[i][j]+2 if s[i] == t[j] else 0
41-
result = max(result, dp[i+1][j+1] + max(p1[i+int(s[i] == t[j])] , p2[j+int(s[i] == t[j])]))
41+
result = max(result, dp[i+1][j+1]+max(p1[i+int(s[i] == t[j])] , p2[j+int(s[i] == t[j])]))
4242
return result

0 commit comments

Comments
 (0)