Resizing
摘要
If you know how performance degrades as the load factor of a hash table increases, you can use this information to pick a table size where the expected performance matches your needs—presuming that you know how many keys the table will need to store. If you do not know the number of elements you need to keep, n, you cannot choose a table size, m, which ensures that α = n/m is below a desired upper bound. In most applications, you do not know n before you run the program. Therefore, you must adjust m as n increases by resizing the table.