Driver code
public static void Main ( ) { string s = " aabab " ; int k = 2 ; int n = s . Length ; int [ , ] l = new int [ MAX_CHAR , MAX ] ; int [ , ] r = new int [ MAX_CHAR , MAX ] ; precompute ( s , n , l , r ) ; Console . Write ( countPalindromes ( k , n , l , r ) ) ; } }