Question: The code creates an LPHashTable and sets the hash weights to { 0 , 1 , 2 , 3 , 4 , 3 , 2
The code creates an LPHashTable and sets the hash weights to in that order.
This task concerns compung weights that opmise inseron of a specific list of names in an
LPHashTable. Inseron is opmised if it uses the least number of probes. There may be more than
one combinaon of weights that achieve this.
On the assignment page you will find a program called DataMakerjava You will use this to
generate your personal custom list, of usernames from studentstxt
You will then write a program called Optimizejava that, for every possible combinaon of
weights, evaluates the number of probes required for inseron of usernames in an
LPHashTable of size It will output a single line containing two integers: a the least number of
probes required, and b the number of weight combinaons that achieve this. Thus if the
output is
then the least number of probes to insert all the usernames was and there were different
combinaons sets of weights that achieved a probe count of
The DataMaker program accepts two command line inputs: i YOUR username, and ii the
number of usernames required in :
java DataMaker
It will generate list outpung it to the screen. You should use file redirecon to pipe this to a file
called mydatatxt Your Optimize program will read in this file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
