Coding & data structures · Hashing, counting, and prefix sums

Hash maps, from the inside

What a hash map actually does when you call get — open addressing versus chaining, why the load factor decides your constant, why insertion order is a language guarantee and not a coincidence, and the two ways an interviewer can make your "O(1)" claim false.

20 min read Full lesson in the app Patterns: hashing, complement-lookup

What you'll be able to do

Before this: complexity-honestly

Log in to read the rest of this lesson

What a hash map actually does when you call get — open addressing versus chaining, why the load factor decides your constant, why insertion order is a language guarantee and not a coincidence, and the two ways an interviewer can make your "O(1)" claim false. This walkthrough runs about 20 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.

Log in to continue

The first module of every track is free to read on the web: see what's open in Coding & data structures.