Assigning the found palindromic length to odd / even length array
R [ j , i ] = rp ; int k = 1 ; while ( ( R [ j , i - k ] != rp - k ) && k < rp ) { R [ j , i + k ] = Math . Min ( R [ j , i - k ] , rp - k ) ; k ++ ; } rp = Math . Max ( rp - k , 0 ) ; i += k ; } }