Having trouble generating a hash function for my code below.
How would I use the numbers on a telephone? For example, each letter
has a number associated with it.
Trying to generate 512 random 3 letter initials and take statistics on
a linked list array size 512 to hold this information.
Also, how would I go about reporting how many have no elements, 1 element,
2 elements, etc...? How can I figure out the maximum number of collisions? Should both results agree with the hashing statistics distribution?
How would I use the numbers on a telephone? For example, each letter
has a number associated with it.
need more words on what that means.
Trying to generate 512 random 3 letter initials
the phone does not use all the letters. Do you want 3 letters from what a phone has, or something else?
either way, load a string with the letters you can use and randomly pick one 3 times per go. Use the length of the string to set up the random function. Look at <random> example code in any <random> documentation online to see how to do that.
Start there. See if you can generate the data, then we can look at the 2nd half.