Question: The code has following 4 functions: div _ hash ( int key, int M ) : divides key k with M size of hash table
The code has following functions:
divhashint key, int : divides key with size of hash table and use remainder of it returns hash value
kmodM
mod
midsqrhashint key, int M: it has steps:
Square the key which is
Take digits from square of key by dividing it by and further mode by return hash value
The hash value obtained is
doublehash int key, int M:
key
example : key
rehash is not palindrome
rehash is palindrome stop
if i and rehash value is not palindrome then make reverse of rehash as hash value.
return hash value
multhashint key, int A:
Perform following steps:
Choose a value A from AMCt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
