mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-23 22:40:25 +08:00
Update hashmap
This commit is contained in:
parent
7ad324ac0a
commit
7a284b7a09
@ -52,7 +52,7 @@ class ArrayHashMap {
|
||||
/* 删除操作 */
|
||||
public void remove(int key) {
|
||||
int index = hashFunc(key);
|
||||
// 置为空字符,代表删除
|
||||
// 置为 null ,代表删除
|
||||
bucket.set(index, null);
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ $$
|
||||
/* 删除操作 */
|
||||
public void remove(int key) {
|
||||
int index = hashFunc(key);
|
||||
// 置为空字符,代表删除
|
||||
// 置为 null,代表删除
|
||||
bucket.set(index, null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user