mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-01 18:14:25 +00:00
build
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/* 旋转哈希 */
|
||||
|
||||
Reference in New Issue
Block a user