Foundations line
Arrays & Hashing problems
Problems about lists of values and the lookups that make them fast. A hash map or a set answers “have I seen this before?” in one step, which turns many slow double loops into a single pass.
- 3 easy
- 6 medium
The 9 problems
In the order the app teaches them. Each page has the problem, five hints and the explained solution.
- Contains DuplicateEasy
- Valid AnagramEasy
- Two SumEasy
- Group AnagramsMedium
- Top K Frequent ElementsMedium
- Product of Array Except SelfMedium
- Valid SudokuMedium
- Encode and Decode StringsMedium
- Longest Consecutive SequenceMedium
On the roadmap
Arrays & Hashing is a station on the foundations line. It is the first station: the map starts here. Next comes Stack, Two Pointers and Math & Geometry.
The roadmap says why each line runs in its order.
Patterns
5 patterns solve these problems. Naming them gives the problems’ methods away, so the list is folded.
Show the 5
- Hash set membership3 problems
- Frequency counting2 problems
- Hash map lookup2 problems
- Prefix and suffix passes1 problem
- Length-prefixed encoding1 problem