With this code, you are doing linear research
index = hash(entry.key);
while (!is_vacant(index))
index = next_index(index);
template <class RecordType>
inline std::size_t table<RecordType>::next_index(std::size_t index) const
{
return ((index+1) % CAPACITY);
}
Say that your card is almost full, and the hash returns 23, then the next slots that you are going to test will be 24, 25, 26, 27, etc.
, , - , . , 23, 23 + 1 = 24, 23 + 4 = 27, 23 + 9 = 32, 23 + 16 = 39. . ? , 23 + n * n. . , mod CAPACITY, .
, -, .