ExplainMates
HomePracticeExploreLeaderboardPricing
← Back to Explore
Feynman teaching note

How Hashing Works

SubjectComputer Science
Area tags
Computer science
YShared byYuki Sato
A hash function is a meat grinder for data: feed in anything (a word, a file), and it spits out a fixed-size number. The same input always gives the same number, and different inputs almost always give different numbers. Why is that useful? Suppose you have a million names and want instant lookup. Instead of scanning the list, you hash the name to get a number, and use that number as a shelf index. Store 'Alice' on shelf hash('Alice'). Later, to find Alice, hash her name again and go straight to that shelf: no searching. That's a hash table, and it's why dictionaries/maps feel instant (O(1) on average). Sometimes two names land on the same shelf (a collision). The table handles that by keeping a small list per shelf, so it stays fast as long as collisions are rare.

Same topic, fresh practice—does not count as an adaptation.

Practice building on this note. If you publish, it can show “Based on” and add an adaptation.

Feedback & gaps

Clarity score: 81/100How well you know it: Can explain it simply

Explain why a hash table can find an item without scanning the whole list.

  • Doesn't explain what makes a hash function 'good' (even spread).
  • Skips what happens when the table gets too full (resizing).

Comments

No comments yet.

ExplainMates

Learn by teaching. Re-teach until it is simple.

Product

PracticeExploreLeaderboardPricing

Company

AboutTerms of ServicePrivacy Policy

© 2026 ExplainMates