Answer to Question #330557 in C++ for affan

Question #330557

The String_collection.txt file contains 4000 random English names (keys), write a C++ program that generates hash codes for each key using polynomial accumulation.In addition your program should perform the following tasks. consider a=37 [constant]

Write separate function for each task and call it in proper order

1. Create a hash table to store the keys based on the hash values generated

➢ Hash value: h(key)=|hash code| mod N , use appropriate value for N

➢ For collision handling use separate chaining

1.1. Write a function insert(key), and find(key) to insert and find the key in the hash table.

1.2. Write a display function that display all the keys in ascending order of hash values (line-wise) such that each line display the keys (names) having the same hash value.

1.3 Find the hash value with maximum number of collisions and display all the string associated with this hash value

2. Compare the total number of collisions for a=33, 37, 39, 41

2.1. Display the total number of collisions occurred for each case


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS