From 522c55b74179266d685300bef50ea4dbeb86b6c8 Mon Sep 17 00:00:00 2001 From: Faiz Date: Fri, 27 Mar 2026 10:52:26 +0530 Subject: [PATCH 1/2] created a directory hashmap for implementing hashmap using python --- hashmap/hashmap.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hashmap/hashmap.py diff --git a/hashmap/hashmap.py b/hashmap/hashmap.py new file mode 100644 index 000000000000..e69de29bb2d1 From 60578cf0cd56079db8e56233ee2e778f00d9d9a9 Mon Sep 17 00:00:00 2001 From: Faiz Date: Fri, 27 Mar 2026 10:55:00 +0530 Subject: [PATCH 2/2] Added Hashmap implementation using list --- hashmap/hashmap.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hashmap/hashmap.py b/hashmap/hashmap.py index e69de29bb2d1..fdb65d7aa8f4 100644 --- a/hashmap/hashmap.py +++ b/hashmap/hashmap.py @@ -0,0 +1,13 @@ +class HashMap: + def __init__(self): + self.map = {} + + def put(self, key, value): + self.map[key] = value + + def get(self, key): + return self.map.get(key, None) + + def remove(self, key): + if key in self.map: + del self.map[key] \ No newline at end of file