mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 21:46:28 +08:00
Fixed wrong parameter of Hash Map Set
This commit is contained in:
parent
4e95997386
commit
eaa48b6b9f
1 changed files with 1 additions and 1 deletions
|
@ -646,7 +646,7 @@ $$
|
|||
/* 添加操作 */
|
||||
public set(key: number, val: string) {
|
||||
let index = this.hashFunc(key);
|
||||
this.bucket[index] = new Entry(index, val);
|
||||
this.bucket[index] = new Entry(key, val);
|
||||
}
|
||||
|
||||
/* 删除操作 */
|
||||
|
|
Loading…
Reference in a new issue