Skip to main content

Hash Tables

Overview

The Hash Tables lesson has two related myGA modules. The first module introduces the concept of hash tables through an analogy, in an easy-to-understand way, while the second module gets into more of the technical, nitty-gritty parts of hash tables.

There are three components to this lesson:

  1. myGA Module 1: Introduction to Hash Tables
  2. myGA Module 2: Hash Tables Deep Dive
    • If the above mGA links do not take you to the correct module, you can find the lesson in your myGA dashboard.
  3. In-Class Exercise: Implementing a Hash Table

The second myGA module contains a link to an exercise in CodePen. The code in CodePen is the exact same as the code for the in-class exercises. Try out the exercise in CodePen and see how far you can get with it. Leave off where you get stuck and we'll review the solution in class.

Learning Objectives

By the end of this lesson, you'll be able to:

  • Define hash functions and hash tables.
  • Articulate the benefits of hash tables as they relate to speed of data access.
  • Define collisions and how to resolve them.

Prerequisites

  • Big O Notation
  • Linked Lists

Duration

2 hours total:

  • 1 hour myGA
  • 1 hour in class

Additional Resources