224k views
3 votes
What type of collision-handling involves using a linear function to find an available index in the hash table?

a) Linear Probing
b) Quadratic Probing
c) Chaining
d) Open Addressing

User Tyreke
by
8.3k points

1 Answer

5 votes

Final answer:

Linear Probing is the type of collision-handling that involves using a linear function to find an available index in the hash table.

Step-by-step explanation:

The type of collision-handling that involves using a linear function to find an available index in the hash table is Linear Probing.

In Linear Probing, when a collision occurs and the desired index is already occupied, the linear function f(i) = (hash(x) + i) % tableSize is used to find the next available index by sequentially checking the next index in the table.

For example, if the hash of the key 'A' is 5 and the table size is 10, but index 5 is already occupied, Linear Probing will check index 6, then index 7, and so on, until an empty index is found.

User Amitchd
by
7.5k points