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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!