Manacher's algorithm for finding longest palindromic substring
GivenastringS,findthelongestpalindromicsubstringinS.AnO(N)Solution(Manacher’sAlgorithm):First,wetransformtheinputstring,S,toanotherstringTbyinsertingaspecialcharacter‘#’inbetweenletters.Thereasonfordo