We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35c1885 commit 98cd3a8Copy full SHA for 98cd3a8
codes/javascript/chapter_hashing/simple_hash.js
@@ -31,7 +31,7 @@ function xorHash(key) {
31
for (const c of key) {
32
hash ^= c.charCodeAt(0);
33
}
34
- return hash & MODULUS;
+ return hash % MODULUS;
35
36
37
/* 旋转哈希 */
codes/typescript/chapter_hashing/simple_hash.ts
@@ -31,7 +31,7 @@ function xorHash(key: string): number {
0 commit comments