Lecture 25

Learning objectives

After this class, you should be able to:

  1. Describe the idea of hashing and desirable features of hash functions.
  2. Given a hash function, compute the hash value of an item.
  3. Given a hash function, the hash table size, and a sequence of insertions, draw the state of the open-addressed hash table after the insertions are complete.
  4. Explain how collisions are resolved in open-addressed hashing, and define linear probing.
  5. Given a hash function, the hash table size, a collision resolution strategy, and a sequence of insertions and searches, give the number of hash table entries searched in each insert and search operation.
  6. Derive the worst case and expected case time complexities for hash table insertion and search.
  7. Identify applications where hash tables can be useful.

Reading assignment

  1. Chapter 10, up to (and including) section 10.2.1, class notes.

Exercises and review questions


Last modified: 8 Apr 2008