Skip to content

hash map #12678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 22, 2025
Merged

hash map #12678

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix long line
  • Loading branch information
isidroas committed Apr 24, 2025
commit cff17ecd764beaedc5f39a9bd821addc0c236592
3 changes: 2 additions & 1 deletion data_structures/hashing/hash_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def _try_set(self, ind: int, key: KEY, val: VAL) -> bool:
"""
stored = self._buckets[ind]
if not stored:
# A falsy item means that bucket was never used (None) or was deleted (_deleted).
# A falsy item means that bucket was never used (None)
# or was deleted (_deleted).
self._buckets[ind] = _Item(key, val)
self._len += 1
return True
Expand Down
Loading