Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Rearrange string characters to form the lexicographically smallest palindrome.
Use character frequencies to determine valid placements for each letter.
Place the smallest characters at the outer edges and the smallest odd-frequency character in the center.
What This Tests
Character frequency analysis
Greedy algorithm design
Palindrome symmetry properties
Lexicographical ordering strategies
Common Patterns
Greedy
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Accepted
838
/1.6k
Acceptance Rate
53.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Test Cases
Input
s =
Output
Expected