RS哈希程序

Suj*_*wal 4 algorithm hash

谁能告诉我RS字符串哈希算法的工作原理或算法?我需要它,但在谷歌上找不到.请至少帮我解决这个算法,我会自己实现它.

Jef*_*ter 7

你的意思是Robert Sedgewick的字符串哈希算法吗?

uint a = 63689, uint b = 378551
foreach ( byte x ; bytes ) {
    value = value * a + x;
    a *= b;
}
return value;
Run Code Online (Sandbox Code Playgroud)

(引自http://pallas.telperion.info/d/hash/).