308-203A Introduction to Computing II Lecture 11: Hashtables

10/25/00


Click here to start


Table of Contents

308-203A Introduction to Computing II Lecture 11: Hashtables

Dictionary

Implementations for Dictionary?

Implementations for Dictionary?

Implementations for Dictionary?

Implementations for Dictionary?

Implementations for Dictionary?

Hashtables

The “Perfect” Solution

Hash Function

Example

Example

Collisions

Open-Addressing

Linear Probing

Linear Probing

Linear Probing

Disadvantages

Chaining

Example (chaining)

Example (chaining)

Worst-Case

Best-Case

Best Case

Best Case

Best Case

Average-Case

Java Hashtable Class

Java Hashtable Class

Java Hashtable Class

Java Hashtable Class

Any questions?

Author: Alfred Holz

Email: wrenne@acm.org

Home Page: http://www.cs.mcgill.ca/~cs203