This commit is contained in:
krahets
2025-03-20 22:54:57 +08:00
parent e81bc45c43
commit 5286e8bbc2
11 changed files with 79 additions and 78 deletions
@@ -354,7 +354,7 @@ index = hash(key) % capacity
for (const c of key) {
hash ^= c.charCodeAt(0);
}
return hash & MODULUS;
return hash % MODULUS;
}
/* 旋轉雜湊 */
@@ -398,7 +398,7 @@ index = hash(key) % capacity
for (const c of key) {
hash ^= c.charCodeAt(0);
}
return hash & MODULUS;
return hash % MODULUS;
}
/* 旋轉雜湊 */