Driven Program
s = " aabab " NEW_LINE k = 2 NEW_LINE n = len ( s ) NEW_LINE l = [ [ 0 for x in range ( MAX ) ] for y in range ( MAX_CHAR ) ] NEW_LINE r = [ [ 0 for x in range ( MAX ) ] for y in range ( MAX_CHAR ) ] NEW_LINE precompute ( s , n , l , r ) NEW_LINE print ( countPalindromes ( k , n , l , r ) ) NEW_LINE