All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.
Given a string s
and an integer k
, find out if the given
string is a K-Palindrome or not.
A string is K-Palindrome if it can be transformed into a palindrome by removing at
most k
characters from it.
Example 1:
Input: s = "abcdeca", k = 2
Output: true
Explanation: Remove 'b' and 'e' characters.
Constraints:
1 <= s.length <= 1000
s
has only lowercase English letters.
1 <= k <= s.length
Difficulty:
Hard
Lock:
Prime
All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.