Algorithms and Data Structures · Senior · Question 29 of 75
What is hash flooding?
- 1A hash table that keeps growing until memory runs out
- 2Filling a cache with junk so that useful entries are evicted
- ✓Correct answer: Sending colliding keys so a hash table becomes O(n)
Explanation
If an attacker can predict the hash function, crafted request parameters land in one bucket and every insert becomes linear, enough to stall a server. Languages defend with randomly seeded hashes (SipHash) or tree-based buckets.