Give the contents of the hash table that results when keys


In this problem, assume that letter A is equivalent to 0. The subscripts do not affect the value of the keys (which are letters).

(a) Give the contents of the hash table that results when keys E1 A S1 Y Q U E2 S2 T I O N are inserted in that order into an initially empty 13-item hash table using linear probing (use h(k) = k mod 13 for the hash function for the k-th letter of the alphabet).

(b) Give the contents of the hash table that results when keys E1 A S1 YQUE2 S2 TION are inserted in that order into an initially empty 13-item hash table using double hashing (use h(k) = k mod 13 for the hash function for the k-th letter of the alphabet, and h′(k) = 1 + (k mod 11) for secondary hashing function).

(c) How many probes are involved when double hashing is used to build a table consisting of n equal keys? Consider each successful or unsuccessful attempt to place an element in a hash to be a single probe.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Give the contents of the hash table that results when keys
Reference No:- TGS02222922

Now Priced at $15 (50% Discount)

Recommended (90%)

Rated (4.3/5)