dsa11 min read
Manacher's Algorithm Explained — Longest Palindromic Substring in Linear Time
Manacher finds the longest palindromic substring in O(n) by exploiting palindrome symmetry to skip redundant character comparisons. The same mirror trick that powers the Z algorithm, applied to the palindrome radius array.
Read →