Hash Tables: Structure and Collision Resolution — Topics & Learning Outcomes

📋 Module Topics🎯 Student Learning Outcomes

Module Topics

Introduction to Hash Tables

Overview of the hash table data structure and its core purpose as a key-value store. Introduces the concept of hashing and why hash tables are widely used in software development.

Internal Array-Based Design

Explains how hash tables are built on top of arrays and how hash functions map keys to array indices. Covers the role of hash functions in determining storage location and retrieval efficiency.

Hash Function Design and Properties

Examines what makes a good hash function, including uniformity, determinism, and speed. Discusses common hashing techniques and how poor hash functions lead to performance problems.

Collision Resolution: Chaining

Covers the chaining strategy for handling collisions, where multiple key-value pairs at the same index are stored in a linked list or similar structure. Analyzes the trade-offs and performance implications of chaining.

Collision Resolution: Open Addressing

Introduces open addressing techniques such as linear probing, quadratic probing, and double hashing as alternatives to chaining. Discusses how each technique locates an alternative slot when a collision occurs.

Performance Analysis of Hash Tables

Analyzes the time and space complexity of hash table operations including insertion, deletion, and lookup. Explores how load factor and collision frequency impact average and worst-case performance.

Implementing a Hash Table in JavaScript

Guides students through a hands-on JavaScript implementation of a hash table incorporating a hash function and a chosen collision resolution strategy. Reinforces theoretical concepts through practical coding exercises.

Student Learning Outcomes

By the end of this module, students will be able to:

MO1
Explain how a hash function maps keys to array indices and identify the properties — determinism, uniform distribution, and computational speed — that characterize a well-designed hash function
Level: UnderstandType: CognitiveCourse mapping: CO1
MO2
Compare chaining and open addressing collision resolution strategies — including linear probing, quadratic probing, and double hashing — by analyzing their trade-offs in memory use, load factor constraints, and deletion handling
Level: AnalyzeType: CognitiveCourse mapping: CO2
MO3
Evaluate the time complexity of hash table insertion, deletion, and lookup operations under average-case and worst-case conditions by relating collision frequency and load factor to divergence from O(1) performance
Level: EvaluateType: CognitiveCourse mapping: CO4
MO4
Construct a functioning hash table in JavaScript — including a hash function, set, get, remove, and keys methods with separate chaining — and validate correctness through systematic testing
Level: CreateType: BehavioralCourse mapping: CO3

Course Outcomes (reference)

CO1Describe both complex and simple data structures.
CO2Select the correct data structure and algorithm to solve specific problems
CO3Implement data structures and algorithms in computer code.
CO4Analyze the performance of algorithms and data structures