#3517

Smallest Palindromic Rearrangement I

specialist · 670 · lc medium +30 · 63.5% accepted · 81 likes · top 66%

Description

Given a palindrome string s, find and return the lexicographically smallest string that is both a permutation of s and itself a palindrome.

Code

1
2
3