Capgemini interview question

write code for palindrome frequency of string