Driver code
public static void main ( String [ ] args ) { 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 ) ; System . out . println ( countPalindromes ( k , n , l , r ) ) ; } }