Suppose an online retailer identifies each member with a 7-digit account number.
ID: 3910301 • Letter: S
Question
Suppose an online retailer identifies each member with a 7-digit account number. Define the hashing function h, which takes the first 4 digits of an account number as one number and the last 3 digits as another number, adds them, and then applies the mod-67 function. (30 points) a) How many linked lists does this create? b) Compute h(5716379). c) Computer h(3842137). Suppose an online retailer identifies each member with a 7-digit account number. Define the hashing function h, which takes the first 4 digits of an account number as one number and the last 3 digits as another number, adds them, and then applies the mod-67 function. (30 points) a) How many linked lists does this create? b) Compute h(5716379). c) Computer h(3842137). Suppose an online retailer identifies each member with a 7-digit account number. Define the hashing function h, which takes the first 4 digits of an account number as one number and the last 3 digits as another number, adds them, and then applies the mod-67 function. (30 points) a) How many linked lists does this create? b) Compute h(5716379). c) Computer h(3842137).Explanation / Answer
Solution:
a) This will create 67 linked list.
Explanation: Since it is modulo 67 function, hence the possible hashed values are {0, 1, 2,......., 66}. Thus, it creates 67 linked list.
b) h(5716379):
5716 + 379 = 6095
6095 % 67 = 65
c) h(3842137):
3842 + 137 = 3979
3979 % 67 = 26
Please give thumbsup, if you like it. Thanks.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.