Problem 1: After inserting 13 elements into a hash table the result looks as in Figure ??. Being a good student, you realize this is a problem. (i) What is the problem here? (ii) Give an example of a hash function that could give rise to this behavior. (iii) What would be a better hash function? 0123 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0+ →→2131 → 2 → 30 33 63 15 266 388 Slika 1: Hash table. 1
Problem 1: After inserting 13 elements into a hash table the result looks as in Figure ??. Being a good student, you realize this is a problem. (i) What is the problem here? (ii) Give an example of a hash function that could give rise to this behavior. (iii) What would be a better hash function? 0123 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0+ →→2131 → 2 → 30 33 63 15 266 388 Slika 1: Hash table. 1
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps