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