Calculate hash value for next window of text : Remove leading digit , add trailing digit
if i < N - M : NEW_LINE INDENT t = ( d * ( t - ord ( txt [ i ] ) * h ) + ord ( txt [ i + M ] ) ) % q NEW_LINE DEDENT