A-Level · AQA · 13 July 2026 · 23:07

Data Structures - Hash Tables

About this video

A full walkthrough of hash tables for AQA A-Level Computer Science (7517). It covers what a hash table is, how hash functions work (including the modulo method) and how to build a table step by step.

The second half deals with collisions: what happens when two keys hash to the same position, and the two ways of handling it, chaining and open addressing. It finishes with rehashing and clustering.

Hash tables are closely related to dictionaries, which are often implemented using one. The dictionaries video shows how they're used, including in dictionary-based compression.

onlinecstutor.com

Chapters
00:03 Definition
00:30 Ingredients
02:05 Arrays
02:49 Key Value Pairs
03:44 Hashing
04:59 Hash Function
06:12 Modulo (mod %)
08:30 'Overflow'
09:19 Creating a hash table
13:23 Collisions - Chaining
12:39 Chaining using linked list
16:21 Collisions - Open addressing
18:57 Open addressing - Rehashing
20:17 Rehashing
21:46 Clustering (issue with OA)

If you'd like to draw your own tree diagrams have a look at the tree generator tool linked below.

onlinecstutor.com/tree_generator.html

If you found this video at all helpful, please consider donating: ko-fi.com/onlinecstutor

Want help applying it in the exam?

The videos explain the content; one-to-one sessions turn it into marks. I tutor online at £50 per 1-hour session, with a free consultation first.