Manacher — Odd Palindromes

Glenn Manacher, 1975

O(n)

Glenn Manacher published this linear-time approach in 1975. It tracks the rightmost odd palindrome and seeds new centers using mirrored radii, only expanding when characters might still match. The animation uses the short string ``babcbab`` with gold active centers, teal mirrors and expansions, coral commits, and a dashed outline of the furthest odd window; the numeric row records half-width radii in the usual competitive-programming convention.