Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose you are implementing a hash table and are trying to choose between using a probing strategy and using separate chaining ( each slot is
Suppose you are implementing a hash table and are trying to choose between using a probing strategy and using separate chaining each slot is actually a linked list that can hold as many records as needed You will use the same hash function and hash table size no matter which strategy you select.
i A primary collision occurs when two records map to the same home slot in the table. Will the number of primary collisions be lower if you choose probing or if
you choose separate chaining? Justify your conclusion carefully.
marks
ii The drawback of using separate chaining is that you will have to perform a linear traversal of the linked list to find a record, and linear traversals are slow. Assuming that a small but significant number of primary collisions will occur, would searching be more efficient if you chose linear probing instead of separate chaining? Justify your conclusion carefully.
marks
iii. Reconsider part ii under the assumption that you would choose quadratic probing as an alternative to separate chaining. Justify your conclusion
carefully.
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