This commit is contained in:
krahets
2023-04-17 21:57:42 +08:00
parent b472215f0e
commit cf4a59e3d6
20 changed files with 247 additions and 198 deletions
+1 -2
View File
@@ -882,12 +882,11 @@ $$
/* 基于数组简易实现的哈希表 */
class ArrayHashMap {
private readonly buckets: (Entry | null)[];
constructor() {
// 初始化数组,包含 100 个桶
this.buckets = (new Array(100)).fill(null);
this.buckets = new Array(100).fill(null);
}
/* 哈希函数 */