Skip to content

Commit 131e7b1

Browse files
authored
Update OpenAddressing.py
1 parent 076cc0c commit 131e7b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Hashing/Hash Table/Hash Table Using Open Addressing/OpenAddressing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __add__(self,key, value): # here we use our hash function yi.e. quadratic
144144

145145
# __universalHash2__ need to be co-prime with self.size
146146
# I had taken care of it in __universalHash2__()
147-
def __quad_probing_(self,key,i): # Quadratic Probing: [ h(k,i) = (h1(k) + i*h2(k)) mod m ]
147+
def __quad_probing_(self,key,i): # Double Hashing : [ h(k,i) = (h1(k) + i*h2(k)) mod m ]
148148
ans = ( self.__universalHash1__(key) + i * self.__universalHash2__(key) ) % self._size_
149149
return ans
150150

0 commit comments

Comments
 (0)