Checking for sub - string from ith index to jth index iff str . charAt ( i + 1 ) to str . charAt ( j - 1 ) is a palindrome
if ( table [ i + 1 , j - 1 ] && str [ i ] == str [ j ] ) { table [ i , j ] = true ; if ( k > maxLength ) { start = i ; maxLength = k ; } } } } Console . Write ( " Longest ▁ palindrome ▁ substring ▁ is : ▁ " ) ; printSubStr ( str , start , start + maxLength - 1 ) ;