Manacher's algorithm
hardThe `#` 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…