Question

In open addressing, if a collision occurs and the hash function h(key) maps to an occupied slot, which probing technique attempts to find the next available slot by checking (h(key) + i^2) % table_size for increasing values of i?

A Linear Probing Correct Answer Incorrect Answer
B Quadratic Probing Correct Answer Incorrect Answer
C Double Hashing Correct Answer Incorrect Answer
D Separate Chaining Correct Answer Incorrect Answer
E Coalesced Hashing Correct Answer Incorrect Answer

Solution

Quadratic probing is an open addressing technique where, upon a collision at h(key), subsequent probes are made at (h(key) + 1² ) % table_size, (h(key) + 2² ) % table_size, and so on.

Practice Next
ask-question