build
This commit is contained in:
parent
bf7c9999b2
commit
1cafc95562
@ -2174,7 +2174,7 @@ comments: true
|
|||||||
// 若遇到指定 key ,则返回对应 val
|
// 若遇到指定 key ,则返回对应 val
|
||||||
if (
|
if (
|
||||||
this.#buckets[j].key === key &&
|
this.#buckets[j].key === key &&
|
||||||
this.#buckets[j][key] !== this.#removed.key
|
this.#buckets[j].key !== this.#removed.key
|
||||||
)
|
)
|
||||||
return this.#buckets[j].val;
|
return this.#buckets[j].val;
|
||||||
}
|
}
|
||||||
@ -2195,7 +2195,7 @@ comments: true
|
|||||||
// 若遇到空桶、或带有删除标记的桶,则将键值对放入该桶
|
// 若遇到空桶、或带有删除标记的桶,则将键值对放入该桶
|
||||||
if (
|
if (
|
||||||
this.#buckets[j] === null ||
|
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.#buckets[j] = new Pair(key, val);
|
||||||
this.#size += 1;
|
this.#size += 1;
|
||||||
@ -2302,7 +2302,7 @@ comments: true
|
|||||||
// 若遇到指定 key ,则返回对应 val
|
// 若遇到指定 key ,则返回对应 val
|
||||||
if (
|
if (
|
||||||
this.#buckets[j].key === key &&
|
this.#buckets[j].key === key &&
|
||||||
this.#buckets[j][key] !== this.#removed.key
|
this.#buckets[j].key !== this.#removed.key
|
||||||
)
|
)
|
||||||
return this.#buckets[j].val;
|
return this.#buckets[j].val;
|
||||||
}
|
}
|
||||||
@ -2323,7 +2323,7 @@ comments: true
|
|||||||
// 若遇到空桶、或带有删除标记的桶,则将键值对放入该桶
|
// 若遇到空桶、或带有删除标记的桶,则将键值对放入该桶
|
||||||
if (
|
if (
|
||||||
this.#buckets[j] === null ||
|
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.#buckets[j] = new Pair(key, val);
|
||||||
this.#size += 1;
|
this.#size += 1;
|
||||||
|
@ -22,7 +22,7 @@ hide:
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://github.com/krahets/hello-algo">
|
<a href="https://github.com/krahets/hello-algo">
|
||||||
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/krahets/hello-algo?style=social&logo=handshake&logoColor=%23101010">
|
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/krahets/hello-algo?style=social&logo=git&logoColor=%23101010">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user