Problem 3844 · Hard

Longest Almost-Palindromic Substring

A substring is almost-palindromic when one deletion leaves a palindrome; two pointers find the one allowed mismatch.

Open the interactive visualisation