Skip to content

Commit 0570aff

Browse files
committed
Fix
1 parent ac7e70f commit 0570aff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: data_structures/hashing/hash_table.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def _set_value(self, key, data):
173173
self.values[key] = data
174174
self._keys[key] = data
175175

176-
def _collision_resolution(self, key):
176+
def _collision_resolution(self, key, data=None): # noqa: ARG002
177177
"""
178178
This method is a type of open addressing which is used for handling collision.
179179
@@ -266,7 +266,7 @@ def insert_data(self, data):
266266
pass
267267

268268
else:
269-
collision_resolution = self._collision_resolution(key)
269+
collision_resolution = self._collision_resolution(key, data)
270270
if collision_resolution is not None:
271271
self._set_value(collision_resolution, data)
272272
else:

Diff for: data_structures/hashing/quadratic_probing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class QuadraticProbing(HashTable):
1111
def __init__(self, *args, **kwargs):
1212
super().__init__(*args, **kwargs)
1313

14-
def _collision_resolution(self, key):
14+
def _collision_resolution(self, key, data=None): # noqa: ARG002
1515
"""
1616
Quadratic probing is an open addressing scheme used for resolving
1717
collisions in hash table.

0 commit comments

Comments
 (0)