Skip to content

Commit 79dbf28

Browse files
Update hash_map.py
1 parent cff17ec commit 79dbf28

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

data_structures/hashing/hash_map.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def __delitem__(self, key: KEY) -> None:
232232
233233
# Test resize down when sparse
234234
## Setup: resize up
235-
>>> hm = HashMap(100, capacity_factor=0.75)
235+
>>> hm = HashMap(initial_block_size=100, capacity_factor=0.75)
236236
>>> len(hm._buckets)
237237
100
238238
>>> for i in range(75):
@@ -245,6 +245,8 @@ def __delitem__(self, key: KEY) -> None:
245245
246246
## Resize down
247247
>>> del hm[75]
248+
>>> len(hm._buckets)
249+
100
248250
>>> del hm[74]
249251
>>> len(hm._buckets)
250252
100

0 commit comments

Comments
 (0)