#3844
Longest Almost-Palindromic Substring
expert · 1180 · lc medium +32 · 22% accepted · 140 likes · top 2%
Description
Given a string s of lowercase English letters, a substring is almost-palindromic if deleting exactly one of its characters turns it into a palindrome. Return the length of the longest almost-palindromic substring in s.
Code
1
2
3