Choose the threshold
Warm-up · Multiple choice · about 3 min
You write a hash table with separate chaining. It doubles when the load factor (keys ÷ buckets) passes a limit. Searches should stay short, and the table should not waste most of its buckets. Which limit do you pick?
Learn the idea first: Load factor and resizing, a visual lesson.
More Load factor and resizing problems
- New positions after resize Warm-up
- Amortized cost Standard
- Count the resizes Standard
- Total rehash moves Standard
- Implement resize Challenge