Question
Assume that you want to design a hashtable to store data of employees in a company that will not have more than 10000 workers at
Assume that you want to design a hashtable to store data of employees in a company that will not have more than 10000 workers at any time. The ID of each worker is his primary phone number in the form of 10 digit number (Area code-three digits carrier-4digits id). ( java) only
a) How would you design your hash function for the index of most employees come from the same area code
b) What would be the size of the array that you would allocate? Explain
c) Give an example where two employees will have the same index. What would you do in this case? Why did you chose this solution.
d) would you chose a different algorithm, and allocate a different size if you know that the three digits following the area code are for the carrier (verizon, ) and most your employees have the same carrier? Explain.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started