1278. Palindrome Partitioning III
https://leetcode.com/problems/palindrome-partitioning-iii
Description
You are given a string s
containing lowercase letters and an integer k
. You need to :
First, change some characters of
s
to other lowercase English letters.Then divide
s
intok
non-empty disjoint substrings such that each substring is a palindrome.
Return the minimal number of characters that you need to change to divide the string.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= k <= s.length <= 100
.s
only contains lowercase English letters.
ac
Last updated