Advertisement

Resizing

  • Thomas Mailund
Chapter

Abstract

If you know how performance degrades as the load factor of a hash table increases, you can use this 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 store, n, then you cannot choose a table size, m, that ensures that α = n/m is below a desired upper bound. In most applications, you do not know n before you run your program. Therefore, you must adjust m as n increases by resizing the table.

Copyright information

© Thomas Mailund 2019

Authors and Affiliations

  • Thomas Mailund
    • 1
  1. 1.Aarhus NDenmark

Personalised recommendations