Question
A list of size N containing a collection of data is given. We want to load the data into an initally empty open hash table
A list of size N containing a collection of data is given. We want to load the data into an initally empty open hash table with B buckets. Write a procedure, which takes the list and the open hash table as input arguments and inserts all the data into the hash table. Use only the list ADT and the dictionary ADT operations in your implementation. What is the computational complexity of the insertion process expressed in terms of N and B?
Assume the uniform hashing condition and the fact that all items of the input list are distinct. In your counting argument you may assume that after completing the insertion process all lists have equal sizes.
Recall: Uniform hashing -- any given element is equally likely to hash into any of the buckets, independently of where any other elements has hashed to.
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