TD Interview Question

Write a code to generate longest palindrome from the input string by rearraging characters in any order