Copyright

Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x(mod 10), show...

Question:

Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x(mod 10), show the resulting

a. open hash table

b. closed hash table using linear probing

c. closed hash table using quadratic probing

d. closed hash table with second hash function h2(x) = 7 - (x mod 7)

Hash Table:

Hash tables are one of the important data structures in computer science, especially used in databases. They allow programmers to find keys approximately in O(1) time complexity.

Answer and Explanation:

Become a Study.com member to unlock this answer!

View this answer

First, we find out which number goes to which slot in the hash map. We calculate mod 10 of each element.

4371 - 1
1323 - 3
6173 - 3
4199 - 9
4344 - 4
96...

See full answer below.


Learn more about this topic:

Loading...
What is a Database Index? - Definition & Tutorial

from

Chapter 6 / Lesson 10
11K

Take a look into the definition of a database index, a comparison of spreadsheets and database indexes, a full-text search engine comparison, a tutorial of database index types, and some categories of database indexes.


Related to this Question

Explore our homework questions and answers library