错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Resizing

  • Thomas Mailund

摘要

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.