Manacher's algorithm

hard

The `#` padding removes the even/odd split, and palindromes mirroring inside palindromes remove the quadratic expansion. Two ideas, one linear algorithm.

Worst O(n)Space O(n)
Loading the manacher's algorithm engine…

Where to go next