Question: 2) Implement a procedure in your favorite computer language that generates 100,000 random integer numbers between 0 and 1000, and stores these numbers to 4
2) Implement a procedure in your favorite computer language that generates 100,000 random integer numbers between 0 and 1000, and stores these numbers to 4 hash tables. The hash tables should have collision resolution by chaining based on (i) the multiplication hashing method with (a) A=0.2 and m=100, (b) A=0.5 and m=100, and (c) A=0.8 and m=100; and (ii) the division hashing method with (d) m=100. Run your procedure 5 times, and calculate the average number of keys per slot (from the 5 runs). Plot 4 histograms with the results (one for each hash table). Post your code, your results, and a deep analysis of your findings? *Tip: Make sure to seed the random function so the drawn numbers are different each time.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
