AiTeky Original Interactive Learning & Practice Intermediate
Hashing and collisions: the birthday problem and the order code that repeated
See how a hash table's load decides how long each lookup takes, why random codes start to repeat much sooner than people expect, and choose an order-code design that never issues a duplicate.
Two ideas from computer science explain a surprising number of software bugs: a hash table gets slower as it fills, and random identifiers collide far earlier than intuition suggests. The second one, the "birthday problem", is behind many duplicate-order and duplicate-ticket incidents.
This course explores both with small Python programs you can run in your browser. Python stands in for the system: the keys and codes are made up, and the arithmetic is exact. Check your language's documentation for its hash-table and random-number tools. All numbers are made up.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
No computer science background is assumed. Basic Python helps.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 20 min Free sample 🔒 AiTeky Pass How full is the table Put 1,000 keys into hash tables of different sizes, and measure the longest chain, the empty slots and how many keys share a slot with the average key.
- 02 20 min 🔒 AiTeky Pass The birthday problem Work out the chance that at least two of n random codes are the same, and find how few codes it takes for repeats to become likely.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

