Added docstring for clear()

This commit is contained in:
Andrew Scott 2022-06-02 22:44:35 -04:00
parent 0cccf1873c
commit 5eb29c4c3c
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -224,9 +224,7 @@ class HashMap:
index = (initial_index + quadratic_factor**2) % self._capacity
def clear(self) -> None:
"""
TODO: Write this implementation
"""
"""Clear the contents of the hash map without changing its capacity"""
self._buckets = DynamicArray()
self._size = 0