From b3437fdddf67da0b22cad9a210ba1dd73a645365 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Tue, 23 Aug 2022 15:07:13 +0800 Subject: [PATCH] feat: add Delete method for hashmap --- datastructure/hashmap/hashmap.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/datastructure/hashmap/hashmap.go b/datastructure/hashmap/hashmap.go index 95235c0..fe4cc0e 100644 --- a/datastructure/hashmap/hashmap.go +++ b/datastructure/hashmap/hashmap.go @@ -79,10 +79,6 @@ func (hm *HashMap) putValue(hash uint64, key, value any) any { } // Delete key value in hashmap -// func (hm *HashMap) Delete(key any) { -// hm.deleteValue(hm.hash(key)) -// } - func (hm *HashMap) Delete(key any) { hash := hm.hash(key) node := hm.table[hash]