Week

Hash Maps and Sets

Recognize lookup, counting, grouping, and prefix-sum patterns, then explain the invariant before coding.

  1. 01 Hash Maps and Sets, From First PrinciplesBuild an intuitive model of hash-based lookup, then connect it to interview reasoning. 50 min
  2. 02 Frequency Counting and Complement LookupTurn repeated comparisons into one-pass counting and partner searches. 50 min
  3. 03 Grouping With Canonical KeysConvert equivalent values into one stable representation and group by it. 45 min
  4. 04 Prefix Sums With a Hash MapTurn subarray equations into lookups, including cases with negative values. 60 min