02Chapter 2: Why arrays are fast and what they lackThis chapter assumes you can write loops, functions, and classes in Python, that you know what indexing a list by position means, and that you can read introductory Big-O notation such as O(1) and O(n). The previous chapter described what a key-value mapping must do: store a value under a key, fetch5 min read
03Chapter 3: Hash functions: turning keys into integersThis chapter assumes you can read short Python programs, know what the modulo operator does, and understand introductory Big-O notation. It covers how a hash function behaves and why the usual designs look the way they do. It does not cover how the integer becomes a bucket position, or what happens 6 min read
04Chapter 4: From hash value to bucket indexA hash function turns a key into a large integer. The table's array has only a few slots, so the table needs one more step: reduce that integer to a valid position in the array. This chapter covers that step, why the way you do it matters, and what changes when the table grows.6 min read
05Chapter 5: Collisions are unavoidableThis chapter assumes you know the modulo operator, indexing arrays by position, and introductory Big-O. It also assumes you have seen the idea of a hash function that turns a key into an integer, and that a table maps hash(key) % size to a bucket index. Here you will see why two different keys end6 min read
06Chapter 6: Resolving collisions with chainingThis chapter assumes you know Python classes and lists, the modulo operator, and introductory Big-O. It also assumes you have seen that two different keys can map to the same bucket index, which is a collision. Here you will see the most direct way to handle one: let each bucket hold more than one e5 min read
07Chapter 7: Resolving collisions with linear probingThis chapter assumes you know how a hash function and a modulo turn a key into a bucket index, and that you know what a collision is. You should also be comfortable with Python lists and with introductory Big-O notation.5 min read
08Chapter 8: Deleting from an open-addressing tableThis chapter assumes you know how linear probing inserts and finds keys, and that you are comfortable with the modulo operator and with load factor. Deletion looks like the easy operation, but in an open-addressing table it is the one that breaks lookups if you do it the obvious way.5 min read
09Chapter 9: Load factor and resizingA hash table is fast only while its buckets stay mostly empty. This chapter covers the number that measures how full the table is, the rule that grows it, and the cost of growing. It assumes you have read the earlier chapters on hash functions, bucket indexes, collisions, chaining, and linear probin5 min read
10Chapter 10: Why lookups are O(1) on average and O(n) at worstThis chapter assumes you know Big-O notation at an introductory level and have read the earlier chapters on hash functions, chaining, linear probing, and load factor. Here you will see where the constant-time claim comes from, what assumptions it relies on, and how it fails.6 min read
11Chapter 11: Choosing keys: equality, hashing, and immutabilityThis chapter assumes you have read the earlier chapters on hash functions, bucket indexes, and collisions. It also assumes you can read basic Python classes. Python is used here because its dict enforces these rules in a visible way.5 min read
12Chapter 12: Where hash tables are usedThis chapter assumes you can read Python, know how a hash table finds a key (hash, bucket index, collision handling), and know why lookups are O(1) on average. It covers the jobs hash tables do in real programs, the key rules each job depends on, and the cases where a hash table is the wrong choice.5 min read
13Chapter 13: Quadratic probing and double hashingThis chapter assumes you have read the chapters on linear probing, tombstones, and load factor. You should know why a probing table stores entries in the slot array, and why deleting an entry needs a marker. You should also be comfortable with the modulo operator and with the idea of two numbers bei5 min read
14Chapter 14: Hash flooding and randomized hashingThis chapter assumes you know how a chained hash table works, what the load factor is, and why lookups are O(1) on average and O(n) at worst. It also assumes you can read short Python programs. Here you will see how an attacker can force the O(n) worst case on purpose, and how real systems prevent i6 min read
15Chapter 15: Robin Hood and cuckoo hashingThis chapter assumes you have read the earlier chapters on linear probing, tombstones, load factor, and resizing. You should be comfortable with a probe sequence, the idea of a home slot, and why long probe runs hurt lookup time.5 min read
16Chapter 16: How standard libraries implement hash tablesThis chapter assumes you know separate chaining, linear probing, load factor, resizing, and the difference between average and worst-case cost from the earlier chapters. It shows how real libraries combine those ideas. Their designs differ because they optimize for different things: memory use, iter5 min read