A palindrome matches pairs at equal distances from its middle. In Example 1, the middle a at index 1 grows into bab; the middle b at index 2 grows into aba. Both have length 3, and either is valid. A middle may be a character or a gap, as bb in cbbd shows. Expanding each middle avoids checking every substring, but still repeats comparisons in overlapping palindromes. Manacher's algorithm reuses known lengths at mirrored centers to remove that repetition. It stores one radius per center, trading linear memory for linear time. We seek a contiguous substring, so skipping characters is not allowed.