Tap here to switch tabs
Problem
Submissions

Problem: Valid Palindrome III

Valid Palindrome III gives you a string and a deletion limit, then asks whether removing at most that many characters can leave a palindrome.

Statement

Given a string s and an integer k, return true if s can become a palindrome by removing at most k characters, or false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of only lowercase English letters.

  • 1≤1 \leq k ≤\leq s.length

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Valid Palindrome III

Valid Palindrome III gives you a string and a deletion limit, then asks whether removing at most that many characters can leave a palindrome.

Statement

Given a string s and an integer k, return true if s can become a palindrome by removing at most k characters, or false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of only lowercase English letters.

  • 1≤1 \leq k ≤\leq s.length