Question
home / study / engineering / computer science / questions and answers / easy java coding q , please help! _____________________________________... Your question has been
home / study / engineering / computer science / questions and answers / easy java coding q , please help! _____________________________________...
Your question has been answered
Let us know if you got a helpful answer. Rate this answer
Question: EASY JAVA CODING Q , PLEASE HELP! ________________...
Bookmark
EASY JAVA CODING Q , PLEASE HELP!
_____________________________________
Ok, so I have a list of 1000 numbers. I also have a hashing function (we are working on hashing in class at the moment) and am going to insert 900 of the numbers i have (keys) into the hash function in 9 batches of 100... because I am comparing the effectiveness of different hashing functions using number of probes per insertion as a metric.
My question is that I need help with the coding aspect. I have my hashing table implementations, but I do not know how to calculate number of probes. I know i need to break up my keys into 9 batches of 100 (I will most likely use a for loop for this and iterate through batches) but how do I code something to count the number of probes? (so how do I make a counter that will add one for every probe (insertion and collision) for a hash table. ? Thanks !
Useful tips from the document I need to finish: Use a two-digit fractional precision (e.g. 1.76) when calculating the average numbers. Count duplicate keys as different ones. Note that each insertion requires at least one probe (for the initial hashing) and, if there are collisions, additional probes.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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