fix a typo

This commit is contained in:
krahets
2023-10-11 17:39:56 +08:00
parent 227bd66223
commit da5ef293d9
6 changed files with 9 additions and 9 deletions

View File

@ -66,7 +66,7 @@ function find(nums, target) {
return -1;
}
/* Driver Codes*/
/* Driver Code */
/* 初始化数组 */
const arr = new Array(5).fill(0);
console.log('数组 arr =', arr);

View File

@ -53,7 +53,7 @@ class HashMapOpenAddressing {
// 若遇到指定 key ,则返回对应 val
if (
this.#buckets[j].key === key &&
this.#buckets[j][key] !== this.#removed.key
this.#buckets[j].key !== this.#removed.key
)
return this.#buckets[j].val;
}
@ -74,7 +74,7 @@ class HashMapOpenAddressing {
// 若遇到空桶、或带有删除标记的桶,则将键值对放入该桶
if (
this.#buckets[j] === null ||
this.#buckets[j][key] === this.#removed.key
this.#buckets[j].key === this.#removed.key
) {
this.#buckets[j] = new Pair(key, val);
this.#size += 1;