Wednesday, October 28, 2009

Load Factor

Before we discuss the collision resolution methods, however, we need to cover three more concepts. Because of the nature of hashing algorithms, there must be some empty elements in a list at all times. In fact, we define a full list as a list in which all elements except one contain data. As a rule of thumb, a hashed list should not be allowed to become more than 75% full. This guideline leads us to our first concept, load factor. The load factor of a hashed list is the number of elements in the list divided by the number of physical elements allocated for the list, expressed as a percentage. The formula in which k represents the number of filled elements in the list and n represents the total number of elements allocated to the list is

No comments:

Post a Comment