Module 22 Β· Data Structures & Problem-Solving β Lesson 7 of 7 Β· ~11 min
Hashing Patterns (capstone)
The hash map is a swiss-army knife
You met the hash map in lesson one. This capstone is about the three patterns it unlocks β the ones that solve a huge fraction of string and array problems:
- Frequency counts β how many times each thing appears.
- Grouping by a canonical key β bucket items that share some computed key.
- Seen-sets β remember what you've encountered (Two Sum was this).
Recognizing which pattern a problem wants is most of the battle.