Question: 1. Implement dynamic tables with open addressing using a linear probing function based on myhash() given in HashTable.ipynb. When the load factor is greater than

1. Implement dynamic tables with open addressing using a linear probing function based on myhash() given in HashTable.ipynb. When the load factor is greater than 1/2, expand to a new table that doubles the size of the old. When the load factor is less than 1/4, contract to a new table that halves the size of the old. 2. Run the following experiments: generate a binary string using PRNG of length 100 , where 1 represents insertion and 0 deletion. For each 1 in the binary string, generate a 3-digit key to insert using a PRNG and for each 0 in the binary string, select at random a number in the table to delete. Count the number of times of table expansion and table contraction. Repeat the experiments for 20 times and compute the average number of times the able is expanded and the average number of times the table is contracted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
