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, not forgot to store (key, hash, value) as node in hash table. Hash table may be stored as 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.