Hash Table

Why would one implement a hash table? When needed, software developers use existing classes which exhibit the properties of a hash table. For example, one might use a List or Dictionary class. That said; the user should fully understand the need and concept of a raw hash table.

A hash table is typically considered when the application requires random access speeds, the domain of values is large and an array would be sparse (most entices unused). The concept is to use some type of function that would allow quickly computing an index in a smaller array to store and looking up the element. Ideally the function would be uniform. That reduces collisions (multiple objects go into the same entry). A way to deal with that is to implement an overflow mechanism allowing multiple buckets Continue reading “Hash Table”