Longest palindromic substring: Difference between revisions

Content deleted Content added
m longest_palindrome_in_S' should be just the max
Line 92:
'''}'''
'''}'''
// A palindrome's size is equal to its radius * 2. However, since our variable
// Radius considers our bogus characters to the side of the center, the size of
longest_palindrome_in_S' = max(PalindromeRadii)
// its corresponding palindrome is actually 2 * (Radius / 2), which means a
longest_palindrome_in_S = (longest_palindrome_in_S'-1)/2
// palindrome's size is equal to its corresponding Radius value in PalindromeRadii
'''return''' longest_palindrome_in_S
longest_palindrome_in_S' = max(PalindromeRadii)
longest_palindrome_in_S'''return''' = (longest_palindrome_in_S'-1)/2
}