Question 15
Question 7 (10 points)
Open Hashing (Separate Chaining)
Build a hash table using the method of Open Hashing and hash function:
$h(w) = val(w_1) \mod 8$ where $val(A) = 0, val(B) = 1,..., and val(Z) = 25$.
Terribly, this means your hash function depends only on the initial letter of each word.
Build the table from the words in the following phrase:
"TWO ROADS DIVERGED IN A YELLOW WOOD"
How many buckets/lists/chains will be empty after the phrase is loaded into the table?
a) 0
b) 1
c) 2
d) 4
e) 5
f) 7
g) There are not enough buckets to contain all the words.