Skip to content

Commit

Permalink
Fix typo (TheAlgorithms#1797)
Browse files Browse the repository at this point in the history
colision => collision
  • Loading branch information
ehdgua01 authored Mar 13, 2020
1 parent b1377f0 commit cb5f8c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data_structures/hashing/hash_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _set_value(self, key, data):
self.values[key] = data
self._keys[key] = data

def _colision_resolution(self, key, data=None):
def _collision_resolution(self, key, data=None):
new_key = self.hash_function(key + 1)

while self.values[new_key] is not None and self.values[new_key] != key:
Expand Down Expand Up @@ -74,9 +74,9 @@ def insert_data(self, data):
pass

else:
colision_resolution = self._colision_resolution(key, data)
if colision_resolution is not None:
self._set_value(colision_resolution, data)
collision_resolution = self._collision_resolution(key, data)
if collision_resolution is not None:
self._set_value(collision_resolution, data)
else:
self.rehashing()
self.insert_data(data)

0 comments on commit cb5f8c6

Please sign in to comment.