Write Code Java Perform Simulations Compare Observed Performance Hashing Theoretical Resul Q37149276

Write code in Java

Perform simulations to compare the observed performance ofhashing with the theoretical results. Declare a probing hash table,insert 10,000 randomly generated integers into the table, and countthe average number of probes used. This number is the average costof a successful search. Repeat the test several times for a goodaverage. Run it for both linear probing and quadratic probing, anddo it for final load factors 0.1, 0.2, …, 0.9. Always declare thetable so that no rehashing is needed. Thus the test for load factor0.4 would declare a table of size approximately 25,000 (adjusted tobe prime).


Solution


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.