From 7a284b7a09fe13c3627b9e6928c8fa2b3fc91df5 Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Thu, 15 Dec 2022 22:53:22 +0800 Subject: [PATCH] Update hashmap --- codes/java/chapter_hashing/array_hash_map.java | 2 +- docs/chapter_hashing/hash_map.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/java/chapter_hashing/array_hash_map.java b/codes/java/chapter_hashing/array_hash_map.java index 89082c2f9..6dc26ba16 100644 --- a/codes/java/chapter_hashing/array_hash_map.java +++ b/codes/java/chapter_hashing/array_hash_map.java @@ -52,7 +52,7 @@ class ArrayHashMap { /* 删除操作 */ public void remove(int key) { int index = hashFunc(key); - // 置为空字符,代表删除 + // 置为 null ,代表删除 bucket.set(index, null); } diff --git a/docs/chapter_hashing/hash_map.md b/docs/chapter_hashing/hash_map.md index 793d90323..4dd325a2e 100644 --- a/docs/chapter_hashing/hash_map.md +++ b/docs/chapter_hashing/hash_map.md @@ -233,7 +233,7 @@ $$ /* 删除操作 */ public void remove(int key) { int index = hashFunc(key); - // 置为空字符,代表删除 + // 置为 null,代表删除 bucket.set(index, null); } }