Question: Load Factor is 0.60 1) Consider the following key-value pairs: (1, a), (4, b), (2, c), (17, d), (12, e), (9, e), (19, f), (4,

Load Factor is 0.60

1) Consider the following key-value pairs: (1, a), (4, b), (2, c), (17, d), (12, e), (9, e), (19, f), (4, g), (8, c), (12, f)

Use separate chaining to adde key-value to table. Assume table size is 10. Assume its buckets are using a linked list where new elements are appended to the end. (Hint: Chaining probing)

Show your hash table after inserting the above key-value pairs in the order given using the hash function h(x) = (x + 3) % 3. Q2) Now, suppose we use above key-value using linear probing, also with table size of 10. And hash function h(x) = x % 3.

2) Now, suppose we use above key-value using linear probing, also with table size of 10. And hash function h(x) = x % 3.

3) How many collisions occurred in Q1 and Q2. Q4) How many times did you increase your table size based on load factor?

4) How many times did you increase your table size based on load factor?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!