Practice Smallest Palindromic Rearrangement I
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given a palindromic string s. Return the lexicographically smallest palindromic permutation of s.
Source: Smallest Palindromic Rearrangement I on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
s = "z"
Output
"z"
# Example 2
Input
s = "babab"
Output
"abbba"
# Example 3
Input
s = "daccad"
Output
"acddca"
Constraints
1 <= s.length <= 10^5
s consists of lowercase English letters.
s is guaranteed to be palindromic.
Related LeetCode Problems
Practice more problems similar to Smallest Palindromic Rearrangement I.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.