Hashing and Maps

Hashing is the “secret weapon” of algorithmic interviews. It allows us to trade space for time, achieving O(1) lookups. This module covers everything from the math of hash functions to complex patterns like LRU Caches and Subarray Sums.

Module Contents

  1. Hash Functions & Collisions

Master the magic of O(1) lookups. Understand Hash Functions, the Pigeonhole Principle, and Collision Resolution strategies.

  1. HashMap HashSet

  2. 03. Chaining & Open Addressing

Learn how hash tables handle the inevitable: when two keys want the same slot. Hardware depth on cache locality.

  1. Counting Problems

  2. Subarray Sum TwoSum

  3. Caching Applications

  4. Review & Cheat Sheet