What is the time complexity of a hash table resize?

What is the time complexity of a hash table resize?

Approach: Analyze rehashing of all elements.

O(n). Every element must be rehashed and moved to the new, larger array.

Follow-up: What is the amortized cost of an insertion including resizing?

Key concepts: linear time, amortized complexity.