Question: 2 . ( 5 points ) Suppose we have a hash table of size 2 9 and we want to implement a system for looking
points Suppose we have a hash table of size and we want to implement a system for looking
up a friends information given hisher name. Which of the following hash functions is the best?
Justify your choice. Assuming none of the names is empty. Short Answer and Letter choice
a hx x
b hx n where n is the number of characters in x
c hxordx ordx where x is the first character in the name and x
is the last.
d hx
n
e hx
i
ordxi where n is the number of characters in x xi the ith character in x
and ordc returns the ordinal value of a character. Instruction on the Sigma summation symbol
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
