Data Structures19 sections · 729 units
Open in Course

Section Recap

What we learned

You now have hash table proficiency:

1.1. Hash sets and maps: O(1)O(1) average lookup, insert, delete.

2.2. Frequency counting: count occurrences of each element in O(n)O(n).

3.3. Complement lookup (two-sum): find pairs by checking if the complement exists.

4.4. Custom keys: group equivalent items using canonical forms.

5.5. Prefix sum + hash: count subarrays with exact sum in O(n)O(n).

6.6. Creative iteration: longest consecutive sequence shows that clever ordering avoids redundant work. Hash tables are your default when you need fast lookups. Learn these patterns and many O(n2)O(n^2) problems become O(n)O(n). In the next section, I'll show you heaps for efficient min/max tracking.