AmazonOA #146
Find Encrypted Password (A.K.A Compute Encoded Product Name
估计简单可在线判题
The input is guaranteed to be a lowercase palindrome. Rearrange all of its characters to get the lexicographically smallest password that is still a palindrome.
输入格式
One line with a lowercase palindrome of length 1..100000.
输出格式
Output the lexicographically smallest palindrome after rearrangement.
样例 1
输入:
babab
输出:
abbba
样例 2
输入:
yxxy
输出:
xyyx
样例 3
输入:
ded
输出:
ded
样例说明
Example 1: the left half is ab and the middle is b, which mirrors to abbba. Example 2: the left half is xy, giving xyyx. Example 3: the sides can only be d and the middle e, so it stays ded.