Hash Tables
Trade a bit of memory for answers in constant time.
Hash Tables progress0 / 8
- Hash Table BasicsTurn a key into an address and skip the search.4m
- Two SumRemember what you have seen and the pair finds itself.5m
- Frequency CountingOne pass, one counter per distinct value.4m
- Group AnagramsGive every item a canonical key, then bucket by it.5m
- When Hashing FailsO(1) is an average, not a promise.5m
- Subarray Sums With a MapThe complement trick, moved onto running totals.6m
- Top K Without a HeapCounts are small integers, so index by them.5m
- LFU: Frequency BucketsGroup keys by use count and eviction becomes O(1).6m
Quiz yourself: 3 questions from this module
1 / 3