Manacher's Algorithm for Palindromes
Find the longest palindromic substring in linear time, by reusing palindromes you have already discovered instead of checking each centre from scratch.
9 min readUpdated 2026-09-03stringsmanacherpalindrome
Find the longest palindromic substring in linear time, by reusing palindromes you have already discovered instead of checking each centre from scratch.