Question: Suppose you already implemented a double hash table class. Running the following code to get the value of a key would return an error.
Suppose you already implemented a double hash table class. Running the following code to get the value of a key would return an error. 123 456 7 8 9 def get(self, key): hash1 = hash1fun (key) hash2 hash2fun (key) = while self.table [hash1] is not None and not self.table [hash1].key==key: hash1 + hash2 hash2%= self.TABLE_SIZE return self.table [hash1].value Can you identify all errors in the above code (give line number) and explain how you would modify the buggy code.
Step by Step Solution
3.50 Rating (157 Votes )
There are 3 Steps involved in it
Double hashing is a collision resolving technique in Open ... View full answer
Get step-by-step solutions from verified subject matter experts
