MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / _iterate_buckets

Method _iterate_buckets

data_structures/hashing/hash_map.py:128–132  ·  view source on GitHub ↗
(self, key: KEY)

Source from the content-addressed store, hash-verified

126 self._resize(len(self._buckets) // 2)
127
128 def _iterate_buckets(self, key: KEY) -> Iterator[int]:
129 ind = self._get_bucket_index(key)
130 for _ in range(len(self._buckets)):
131 yield ind
132 ind = self._get_next_ind(ind)
133
134 def _add_item(self, key: KEY, val: VAL) -> None:
135 """

Callers 3

_add_itemMethod · 0.95
__delitem__Method · 0.95
__getitem__Method · 0.95

Calls 2

_get_bucket_indexMethod · 0.95
_get_next_indMethod · 0.95

Tested by

no test coverage detected