> For the complete documentation index, see [llms.txt](https://jaywin.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jaywin.gitbook.io/leetcode/solutions/1216-valid-palindrome-iii.md).

# 1216. Valid Palindrome III

<https://leetcode.com/problems/valid-palindrome-iii>

## Description

Given a string `s` and an integer `k`, return `true` if `s` is a `k`**-palindrome**.

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.
```

**Example 2:**

```
**Input:** s = "abbababa", k = 1
**Output:** true
```

**Constraints:**

* `1 <= s.length <= 1000`
* `s` consists of only lowercase English letters.
* `1 <= k <= s.length`

## ac

```java
```
