Tap here to switch tabs
Problem
Submissions

Problem: Palindrome Partitioning III

Try to solve the Palindrome Partitioning III problem.

Statement

You are given a string s and an integer k. You need to divide s into k non-empty disjoint substrings.

For each substring, you can change any of its characters to any other character.

Return the minimum number of character changes required so that each of the k substrings becomes a palindrome.

Constraints:

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

  • s consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Palindrome Partitioning III

Try to solve the Palindrome Partitioning III problem.

Statement

You are given a string s and an integer k. You need to divide s into k non-empty disjoint substrings.

For each substring, you can change any of its characters to any other character.

Return the minimum number of character changes required so that each of the k substrings becomes a palindrome.

Constraints:

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

  • s consists of only lowercase English letters.