Rehashing
When the load factor gets “too large” (over a constant threshold on ?), rehash all the elements into a new, larger table:
- takes O(n), but amortized O(1) as long as we (just about) double table size on the resize
- spreads keys back out, may drastically improve performance
- gives us a chance to retune parameterized hash functions
- avoids failure for closed hashing techniques
- allows arbitrarily large tables starting from a small table
- clears out lazily deleted items