Chapter 11 - Maps
or Hash Tables


Document last modified: 

Overview

Dynamic set (Chapter 10)

Many applications require a dynamic set that supports only the dictionary operations INSERT, SEARCH, and DELETE.

Example: a symbol table in a compiler.

Hash table

A hash table is effective for implementing a dictionary.

The expected time to search for an element in a hash table is O(1), under some reasonable assumptions.

A hash table is a generalization of an ordinary array.

We use a hash table when we do not want to (or cannot) allocate an array with one position per possible key.

Issues that we’ll explore in hash tables:

Mapping

What data structures books and algorithms commonly refer to as a dictionary is really a mathematical mapping defined by the function:

Mapping Operations

Abstraction and Implementations