#hash-tables
4 articles
Hashing: The O(1) Superpower
How hash functions and buckets turn lookup into O(1) average time — the intuition behind collisions, chaining, and load factor that every engineer should own.
LRU Cache
The definitive guide to the LRU cache — how to combine a hash map and a doubly linked list to get O(1) get and put, why neither structure alone is enough, and how to walk the full implementation in an interview.
Hash Tables
The interview MVP. How hash functions turn arbitrary keys into O(1) lookups, what actually happens during a collision, and why "just use a hash map" is usually the right instinct.
The Sliding Window Pattern
Learn the sliding window technique to solve "longest/shortest/contains" subarray and substring problems in O(n) instead of O(n²). Covers fixed and variable windows, the expand-right-shrink-left template, and the classic bugs.