subject

Create a hash function then test and evaluate the results. The set of strings are from a "words. txt" file (there are 45,402 words in the file, no repeating words. Map the words to 45,402 buckets using a hash function).Requirements:Create an array of 45,402 integers and initialize each to zero. These will be used to store how many times each index is produced from the hash function. Read each line of the input file (words. txt).Create a hash from each word using the hash function. Modulus the results of your hash function by 45,402 to get an index, and increment the appropriate bucket (array entry).After the entire file is processed, calculate and print the percentage on hashes that resulted in collisions (# of collisions / total strings hashed *100)The number of collisions can be obtained from the array at the end of the program. Any values >1 in the array indicate that a collision occurred on that index. For example, if theArray[102] = 3, that means two collisions occurred on index 102 because only one value should have been mapped there by a perfect hash function. Write the contents of the array to a file named hashresults. csv, then import it into a spreadsheet program and graph the results.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
When building customer relationships through email what should you not do? question 2 options: utilize proper grammar, spelling, and punctuation type in all capital letters use hyperlinks rather than attachments respond to all emails within 24 hours
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
Create a hash function then test and evaluate the results. The set of strings are from a "words. txt...
Questions
question
Mathematics, 08.10.2020 18:01
Questions on the website: 13722359