Update hashmap

This commit is contained in:
Yudong Jin 2022-12-15 22:53:22 +08:00
parent 7ad324ac0a
commit 7a284b7a09
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ class ArrayHashMap {
/* 删除操作 */
public void remove(int key) {
int index = hashFunc(key);
// 置为空字符代表删除
// 置为 null 代表删除
bucket.set(index, null);
}

View file

@ -233,7 +233,7 @@ $$
/* 删除操作 */
public void remove(int key) {
int index = hashFunc(key);
// 置为空字符,代表删除
// 置为 null,代表删除
bucket.set(index, null);
}
}