Akamai Interview Question

Write the function to count the number of palindromic substrings