Skip to content

Practice Construct K Palindrome Strings

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Medium#1400
LeetCode Problem

Construct K Palindrome Strings

Problem Statement

Given a string s and an integer k, return true if you can use all the characters in s to construct non-empty k palindrome strings or false otherwise.

Source: Construct K Palindrome Strings on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
s = "annabelle", k = 2
Output
true

# Example 2

Input
s = "leetcode", k = 3
Output
false

# Example 3

Input
s = "true", k = 4
Output
true

Constraints

1 <= s.length <= 10^5
s consists of lowercase English letters.
1 <= k <= 10^5

Related LeetCode Problems

Practice more problems similar to Construct K Palindrome Strings.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.