Hash table

From DmWiki

A hash table is an array of a size less than what is needed to contain all of the possible key values becuase often times many of the array elements are empty.

The way the index of the array is computed is with a modulo operator. This often results in "collisions" since more than one key value corresponds to the destination index. The more the hash table fills up the more often collisions will result. This is called the load factor of the hash table.

This article is a stub. You can help improve the article by expanding it.


DevMaster navigation