Please note: read the guideline before starting.
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, don't forget to store (key, hash, value) as a node in the hash table. A hash table may be stored as a simple list of nodes.
Notes:
- You can implement other methods of the dict interface (both regular and magic):
clear__delitem__getpopupdate__iter__
- you can test
Dictionarywith custom classPointthat has__hash__and__eq__magic methods; - You should implement your own custom dictionary, do not use built-in
dictfor this task.