Opening page…
Trading memory for speed with hash sets and maps for O(1) lookups and counting.
Solved
| Solved | # | Problem | Pattern | Level | Preview |
|---|---|---|---|---|---|
| 1 | Two Sum | hash map · complement lookup | Easy | ||
| 2 | Contains Duplicate | hash set | Easy | ||
| 3 | Valid Anagram | frequency count | Easy | ||
| 4 | Group Anagrams | hash map · canonical key | Medium | ||
| 5 | Longest Consecutive Sequence | hash set | Medium | ||
| 6 | Insert Delete GetRandom O(1) | design · hash map | Medium | ||
| 7 | 4Sum II | meet in the middle · hash map | Medium | ||
| 8 | Insert Delete GetRandom O(1) - Duplicates allowed | design · hash map | Hard |
Showing 1–8 of 8 problems