← All resources
Learning path / 2 lessons
A first look at hashing
Two short lessons on using sets and frequency maps to solve array and string problems.
Your learning path
- 01
Contains Duplicate: hash sets vs sorting
Learn when a set is the right tool, and what you trade away when you sort instead. A worked explanation of LeetCode 217.
3 min read - 02
Valid Anagram: count what matters
Use a frequency map to compare two strings, and understand when counting is a better fit than sorting. LeetCode 242, explained.
3 min read