Capgemini Interview Question

write code for palindrome frequency of string