Update codes/typescript/chapter_hashing/array_hash_map.ts

Co-authored-by: Justin Tse <xiefahit@gmail.com>
This commit is contained in:
Yudong Jin 2022-12-26 23:12:22 +08:00 committed by GitHub
parent 528b716766
commit f628fe27d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ class ArrayHashMap {
/* 添加操作 */
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);
}
/* 删除操作 */