hash tables should we useas we saw earliera load factor between / and / provides good performance in the average case for our implementation we are going to use load factor of / listing the hashmap py module implementation of the map adt using closed hashing and probe with double hashing from arrays import array class hashmap defines constants to represent the status of each table entry unused none empty _mapentrynonenone creates an empty map instance def __init__self )self _table array self _count self _maxcount len(self _tablelen(self _table/ returns the number of entries in the map def __len__self )return self _count determines if the map contains the given key def __contains__selfkey )slot self _findslotkeyfalse return slot is not none adds new entry to the map if the key does not exist otherwisethe new value replaces the current value associated with the key def addselfkeyvalue )if key in self slot self _findslotkeyfalse self _table[slotvalue value return false else slot self _findslotkeytrue self _table[slot_mapentrykeyvalue self _count + if self _count =self _maxcount self _rehash(return true returns the value associated with the key def valueofselfkey )slot self _findslotkeyfalse assert slot is not none"invalid map key return self _table[slotvalue removes the entry associated with the key def removeselfkey )