updating maximum length of the substring and updating the finishing index of the suffix
if ( LCSRe [ i ] [ j ] > res_length ) : NEW_LINE INDENT res_length = LCSRe [ i ] [ j ] NEW_LINE index = max ( i , index ) NEW_LINE DEDENT else : NEW_LINE LCSRe [ i ] [ j ] = 0 NEW_LINE