mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
Update hash_set_linked_list.py
This commit is contained in:
parent
178b3aea34
commit
2f8af300a6
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
class HashSet:
|
class HashSet:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, size):
|
||||||
self.size = 131
|
self.size = size
|
||||||
self.bucket = [Bucket() for _ in range(self.key_range)]
|
self.bucket = [Bucket() for _ in range(self.size)]
|
||||||
|
|
||||||
def _get_hash_key(self, key):
|
def _get_hash_key(self, key):
|
||||||
return key % self.size
|
return key % self.size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user