home / study / engineering / computer science / questions and answers / easy jav
ID: 3821162 • Letter: H
Question
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.
Explanation / Answer
i assume your hash function returns a value with maximum range 'N'.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.