Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started