28 worked problems

Arrays & Hashing

Frequency maps, prefix sums, in-place scans. You need constant-time lookup, frequency counts, deduplication, or information about a prefix.

Recognition signal

When should you think of Arrays & Hashing?

You need constant-time lookup, frequency counts, deduplication, or information about a prefix.

Core invariant

What must stay true?

The map or prefix state summarizes exactly the portion already scanned.

Practice in a deliberate order

What to learn in this cluster

  1. 01Direct hash lookup
  2. 02Frequency maps and grouping
  3. 03Prefix sums and counting subarrays

All Arrays & Hashing problems

28 of 28 walkthroughs
Continue the cluster

Related patterns and study guides