Skip to content

Commit f628fe2

Browse files
krahetsjustin-tse
andauthored
Update codes/typescript/chapter_hashing/array_hash_map.ts
Co-authored-by: Justin Tse <[email protected]>
1 parent 528b716 commit f628fe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codes/typescript/chapter_hashing/array_hash_map.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ArrayHashMap {
4141
/* 添加操作 */
4242
public set(key: number, val: string) {
4343
let index = this.hashFunc(key);
44-
this.bucket[index] = new Entry(index, val);
44+
this.bucket[index] = new Entry(key, val);
4545
}
4646

4747
/* 删除操作 */

0 commit comments

Comments
 (0)