Maximum palindrome#5062

Maximum palindrome

1 sekondë
128 megabajt
Shumë e lehtë

Remove the minimum number of characters from the given string so that it becomes a palindrome (a string that reads the same both forwards and backwards).

Hyrja

One non-empty string of up to characters. The string consists only of uppercase Latin letters.

Dalja

Print the longest possible palindrome that can be obtained from the original string by deleting some characters. If there are multiple such palindromes, print any one of them.

Shembuj

Shembulli 1

Loading
Loading