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 ] = min ( R [ j ] [ i - k ] , rp - k ) ; k ++ ; } rp = max ( rp - k , 0 ) ; i += k ; } }