Resizing and rehashing
mediumThe bucket index is hash(k) mod m, so changing m changes every key's index - the table cannot be copied, it must be rebuilt. Amortised O(1), but the tail latency is real.
Average
O(1) amortisedWorst O(n)Space O(n + m)Loading the resizing and rehashing engine…