Monday, April 25, 2011

Hash Table: index = f(key, arrayLength)

In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[1][2]
Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases, while compiler implementations usually use hash tables to look up identifiers.


http://en.wikipedia.org/wiki/Associative_array
An associative array (also associative container, map, mapping, dictionary, finite map, and in query-processing an index or index file) is an abstract data type composed of a collection of unique keys and a collection of values, where each key is associated with one value (or set of values). The operation of finding the value associated with a key is called a lookup or indexing, and this is the most important operation supported by an associative array. The relationship between a key and its value is sometimes called a mapping or binding.


Hash Tables


http://en.wikipedia.org/wiki/Hash_table


Read & understand clearly about Hash tables, their use & applications.


hash table - internals
http://stackoverflow.com/questions/4453476/hash-how-does-it-work-internally




Hash table advantages:



In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Many hash table designs also allow arbitrary insertions and deletions of key-value pairs, at constant average (indeed, amortized[1]) cost per operation.[2][3]

In many situations, hash tables turn out to be more efficient than search trees or any other table lookup structure. For this reason, they are widely used in many kinds of computer software, particularly for associative arraysdatabase indexing,caches, and sets.



Hash Table Samples

No comments:

Post a Comment