Description
In this class we have seen how to has on integer values when the value is the same as a key. In this practice today you will create a hash table to hold string values. The size of the table will be whatever the user enters. The key for each value will be the combined ASCII value of every character in the string. Your program should print out the table as seen in our examples. You can handle collision using either open addressing or chaining. Finally, you will create a driver that takes in four values.
Sample Output:
Hello.
What size is the table? 5
Enter a value: A
Key is 65
BUCKET 0
Enter a value: F
Key is 70
BUCKET 0
Enter a value: abcd
Key is 394
BUCKET 4
Enter a value: All Hail Lord Brummett!!!!
Key is 2140
BUCKET 0
HERE IS THE TABLE:
———-
—-> A—-> F—->All Hail Lord Brummett!!!!
-1
-1
-1
—-> abcd
———-