diff --git a/HashMap.py b/HashMap.py index 7605911..f38ab77 100644 --- a/HashMap.py +++ b/HashMap.py @@ -70,3 +70,12 @@ def retrieve(self, key): retrieval_collisions += 1 return + +hash_map = HashMap(15) +hash_map.assign("gabbro", "igneous") +hash_map.assign("sandstone", "sedimentary") +hash_map.assign("gneiss", "metamorphic") + +print(hash_map.retrieve("gabbro")) +print(hash_map.retrieve("sandstone")) +print(hash_map.retrieve("gneiss"))