previous | start | next

Hash Tables

A hash table is conceptually a collection of (key, value) pairs. (Like a Map).

Two main operations on a hash table, h are

        h.put(key, value)
        value = h.get(key)
     

A hash table should guarantee that these two operations are very efficient (at least on average).

        In particular, if the hash table contains N keys (and
        associated values) we want these operations to be O(1). 
     


previous | start | next