Longest palindromic substring: Difference between revisions

Content deleted Content added
Format code
I think that minus 1 is wrong and it's unnecessary to multiply by 2
Line 36:
// Save the radius of the longest palindrome in the array
PalindromeRadii[Center] = 2 * Radius
Center = Center + 1
Line 42:
longest_palindrome_in_S' = max(PalindromeRadii)
longest_palindrome_in_S = (longest_palindrome_in_S' - 1) / 2
'''return''' longest_palindrome_in_S