标签: string-matching modular-arithmetic clrs rabin-karp
我正在研究从CLRS进行字符串匹配的Rabin-karp算法,其中模块化算法用于哈希,我没有研究过,所以我不明白的是(7 - 3·3)·10 + 2(mod 13)评估为8(mod 13)
答案 0 :(得分:0)
(7 – 3·3)·10 + 2(mod 13)评估为8(mod 13)
因为7-9 = 11,而不是-2。