Tap here to switch tabs
Problem
Submissions

Problem: Longest Almost-Palindromic Substring

Longest Almost-Palindromic Substring asks for the maximum length of a nonempty contiguous part of a string that becomes a palindrome after deleting at most one character.

Statement

Given a string s, find the length of the longest almost palindromic substring in s.

A string is defined as almost palindromic if it can be transformed into a palindrome by deleting at most 11 character from it.

A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 2≤2 \leq s.length ≤2500\leq 2500

  • s consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Almost-Palindromic Substring

Longest Almost-Palindromic Substring asks for the maximum length of a nonempty contiguous part of a string that becomes a palindrome after deleting at most one character.

Statement

Given a string s, find the length of the longest almost palindromic substring in s.

A string is defined as almost palindromic if it can be transformed into a palindrome by deleting at most 11 character from it.

A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 2≤2 \leq s.length ≤2500\leq 2500

  • s consists of only lowercase English letters.