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

Method _get_bucket_index

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

Source from the content-addressed store, hash-verified

48 self._len = 0
49
50 def _get_bucket_index(self, key: KEY) -> int:
51 return hash(key) % len(self._buckets)
52
53 def _get_next_ind(self, ind: int) -> int:
54 """

Callers 1

_iterate_bucketsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected