This assignment will be broken into two parts: a. Implementing an open addressin
ID: 3703258 • Letter: T
Question
This assignment will be broken into two parts:
a. Implementing an open addressing hash table (i.e. one that uses a probe to resolve collisions).
b. Implementing a chained hash table (i.e. one that uses linked lists to store multiple items of the same hash).
Requirements for both tables are the following: a. Both forms of the hash table must use primes as the table size. b. Both forms have a load factor of 0.5. Once the load factor is exceeded, the hash table must grow. c. For the probing function in part A, a linear probe is sufficient. d. For Part B, each slot must be able to support multiple entries. e. Both must support insertions, lookups, and removes to and from the hash table
Explanation / Answer
Hi,
Have used C++ for implementation.Code is also explained. Hope this helps.
(A) Open Addressing Linear Probing :
Output:
(B) Chained Hash Table:
Output: