1216. Valid Palindrome III

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:

Difficulty:

Hard

Lock:

Prime

Company:

Facebook

Solution(Chinese):

LEETCODE 1216. Valid Palindrome III 解题思路分析