From 4eeeabb2276a8d03ed351b853e9571189063870a Mon Sep 17 00:00:00 2001 From: dudaodong Date: Tue, 23 Aug 2022 15:07:54 +0800 Subject: [PATCH] feat: add Delete method for hashmap --- datastructure/hashmap/hashmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastructure/hashmap/hashmap.go b/datastructure/hashmap/hashmap.go index fe4cc0e..6950444 100644 --- a/datastructure/hashmap/hashmap.go +++ b/datastructure/hashmap/hashmap.go @@ -78,7 +78,7 @@ func (hm *HashMap) putValue(hash uint64, key, value any) any { return value } -// Delete key value in hashmap +// Delete item by given key in hashmap func (hm *HashMap) Delete(key any) { hash := hm.hash(key) node := hm.table[hash]