Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the following hash table to aswer questions 2.1- 2.3. The hash table stores integer keys using a hash function h(k) = k mod 17.
Use the following hash table to aswer questions 2.1- 2.3. The hash table stores integer keys using a hash function h(k) = k mod 17. All keys were inserted without collisions.
Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Key | 69 | 88 | 4 | 59 | 94 | 27 | 47 | 31 | 16 | ||||||||
Has_Been_Used | f | t | f | t | t | f | f | f | t | t | t | f | f | t | t | f |
2.2. At what position will key 60 be stored in the original hash table if double hashing is used to resolve collisions, assuming h1(k) = h(k) and h2(k) = 2 + (k mod 11)
a. 0
b. 6
c. 11
d.12
e. none of these answers
The answer key to this question said that the answer was B (6). I'm not too sure how 6 could be the answer. Please explain how 6 is the answer, thanks.
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