P [ i , j ] = true if substring str [ i . . j ] is palindrome , else false
for ( int i = 0 ; i < MAX_STR_LEN ; i ++ ) { for ( int j = 0 ; j < MAX_STR_LEN ; j ++ ) P [ i , j ] = false ; Kpal [ i ] = 0 ; }