Basis Lab

Finding It Instantly

What Makes a Hash Function Good

Last timeHow Full Is Too Full

A hash for a table needs three things: it must spread keys evenly, it must be fast, and it must give the same answer every time it is asked. A hash for a password needs almost the opposite.

Everything so far assumed the hash spreads keys evenly. This lesson asks what

that requires, what else the hash owes, and why the word covers two jobs that

have nothing in common.

The lesson stops here

1 more paragraph to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01Finding One Thing Among Many
  2. 02Turning a Key Into an Addressopening only
  3. 03When Two Keys Collideopening only
  4. 04How Full Is Too Fullopening only
  5. 05What Makes a Hash Function Goodyou are here
  6. 06Asking Only Whether It Is Thereopening only
  7. 07What a Hash Table Cannot Doopening only
  8. 08The Same Trick Everywhere Elseopening only

Read alongside