- Read the guideline before start
Let's create your own class Dictionary
and implement methods:
__setitem__(self, key, value)
__getitem__(self, key)
__len__(self)
Be attentive to basic requirements for the implementation of the dictionary (initial capacity, load factor, resize ...)
Also, not forgot to store (key, hash, value)
as node in hash table.
Notes:
- you can implement other methods of the dict interface (both regular and magic):
clear
__delitem__
get
pop
update
__iter__
- you can test
Dictionary
with custom classPoint
that has__hash__
and__eq__
magic methods.