Manacher’s palindrome algorithm

Find all the pieces of a word that read the same forwards and backwards. For example, топот contains both опо and топот. These pieces are called palindromes.

Choose a center on a character or between characters. Compare outwards. Inside a known palindrome, its mirror center already tells us part of the radius. Two rows of radii describe all palindromic substrings.