01Chapter 1: What hash sets and hash maps are forThis chapter assumes you can write loops and functions in a mainstream language, and that you know how lists (arrays) are indexed. You should also know the basic idea of Big-O notation: O(n) means the work grows with the number of items, and O(1) means it stays about the same. The examples use Pytho3 min read
02Chapter 2: Fast membership tests and removing duplicatesThis chapter assumes you can write Python loops and functions, know how lists and indexing work, and have a basic idea of Big-O notation. Hash internals come in later chapters. Here you use sets as a tool.2 min read
03Chapter 3: Counting and grouping with mapsThis chapter assumes you can write loops and functions in Python, know what a dictionary and a list are, and have a basic idea of Big-O notation. It covers the two most common jobs for a hash map: counting how often things occur, and grouping items by a shared property.3 min read
04Chapter 4: Missing keys and default valuesThis chapter assumes you can write Python loops and functions, know what a dictionary is, and have seen the counting and grouping patterns from the previous chapter. Here we look at what happens when you ask a map for a key it does not hold, and the main ways to handle that case.2 min read
05Chapter 5: Combining sets: union, intersection, differenceThis chapter assumes you can write Python loops and functions, know what a set is (an unordered collection of unique, hashable values), and have a basic sense of Big-O notation. Earlier chapters showed how a set removes duplicates and answers membership tests quickly. Here you will combine whole set2 min read
06Chapter 6: Hash functions: turning keys into integersThis chapter assumes you can write basic Python, know what a list index is, and have a rough idea of Big-O notation. It covers the hash function, the first piece of a hash table.3 min read
07Chapter 7: Inside a hash table: buckets and indexingThis chapter assumes you know basic Python, how list indexing works, and the idea of O(1) time. It shows how a hash table turns a key into a position in an array, so lookups don't have to scan every item.2 min read
08Chapter 8: Collisions: chaining and open addressingThis chapter assumes you know that a hash function turns a key into an integer, and that a table uses that integer to pick a slot in an array. Here you will see what happens when two different keys pick the same slot.2 min read
09Chapter 9: Load factor and resizingThis chapter assumes you know how a hash table maps a key to a bucket with hash(key) % bucket_count, and that collisions are handled by chaining or open addressing. It also assumes basic Big-O notation. Here you will see why a table must grow as it fills, and how growing keeps lookups fast.3 min read
10Chapter 10: Why operations are O(1) on average, and when they are notThis chapter assumes you know basic Big-O notation, can read Python, and have seen how a hash table uses a hash function, buckets and collision handling. Here we connect those pieces to the cost of each operation.3 min read
11Chapter 11: Keys: the equality and hash contractThis chapter assumes you know what a hash set and a hash map do, and that a hash function turns a key into an integer used to pick a bucket. Here we look at what a key must promise so that lookups find what you stored.2 min read
12Chapter 12: Mutable keys and lost entriesThis chapter assumes you know how a hash table places a key in a bucket, and that a key's hash and equality must agree. If either idea is shaky, review the chapters on hash tables and the key contract first.2 min read
13Chapter 13: What you can and cannot assume about iteration orderThis chapter assumes you know how a hash table stores entries in buckets, and that you can read basic Python. Iteration order is the sequence in which a loop visits the items of a set or map. Many bugs come from relying on an order that the language never promised.2 min read
14Chapter 14: Choosing between lists, hash maps and ordered structuresThis chapter assumes you know Python lists, dicts and sets, and basic Big-O notation. It also assumes you have seen how a hash table gets average constant-time lookups. Here the goal is a decision procedure: given a task, which structure fits?2 min read
15Chapter 15: Hash flooding and untrusted inputThis chapter assumes you know how a hash table works: a hash function picks a bucket, and collisions are resolved inside the bucket. It also assumes you know the average and worst-case costs from the earlier chapters. Here the question is what happens when someone chooses the keys on purpose.3 min read