Longest palindromic substring: Difference between revisions

Content deleted Content added
Lurrch (talk | contribs)
Manacher's algorithm: Made one comment a little clearer.
Tags: Mobile edit Mobile web edit
Line 80:
'''if''' PalindromeRadii[MirroredCenter] < MaxMirroredRadius '''{'''
// the palindrome centered at MirroredCenter is entirely contained in the palindrome centered at OldCenter
// So, MirroredCenter and Center have the same sized palindrome
 
PalindromeRadii[Center] = PalindromeRadii[MirroredCenter]
Center = Center+1
Line 98 ⟶ 97:
// Set Radius to the minimum size of the palindrome at Center so it doesn't recheck unnecessarily
Radius = MaxMirroredRadius
 
 
'''break''' // exit while loop early
'''}'''