Hash Map Patterns

Problems using hash map techniques

33 lessons
88 min

Lessons

1. What is Hash Map Patterns

Pattern overview

2m

2. Prerequisites

What you need first

1m

3. When to Use

Pattern triggers

2m

4. When NOT to Use

Avoid forcing this pattern

2m

5. Hash vs Array: When to Use Which

Choosing the right structure

2m

6. LeetCode 1 Two Sum - Problem Statement

The problem

2m1 problems

7. Quiz: What Makes a Good Hash Map Key

Test your understanding

2m1 problems

8. LeetCode 1 Two Sum - Solution

The core idea

3m

9. LeetCode 1 Two Sum - Example and Complexity Analysis

Walkthrough and analysis

3m

10. LeetCode 1 Two Sum - Implementation

The approach

4m1 problems

11. LeetCode 49 Group Anagrams - Problem Statement

The problem

2m1 problems

12. LeetCode 49 Group Anagrams - Why Naive Fails

The trap

2m

13. LeetCode 49 Group Anagrams - Solution

The core idea

3m

14. LeetCode 49 Group Anagrams - Example and Complexity Analysis

Walkthrough and analysis

3m

15. LeetCode 49 Group Anagrams - Implementation

The approach

4m1 problems

16. LeetCode 128 Longest Consecutive Sequence - Problem Statement

The problem

2m1 problems

17. Quiz: Identifying Sequence Starts

Test your understanding

2m1 problems

18. LeetCode 128 Longest Consecutive Sequence - Why Naive Fails

The trap

2m

19. LeetCode 128 Longest Consecutive Sequence - Solution

The core idea

3m

20. LeetCode 128 Longest Consecutive Sequence - Example and Complexity Analysis

Walkthrough and analysis

3m

21. LeetCode 128 Longest Consecutive Sequence - Implementation

The approach

4m1 problems

22. LeetCode 347 Top K Frequent Elements - Problem Statement

The problem

2m1 problems

23. LeetCode 347 Top K Frequent Elements - Why Naive Fails

The trap

2m

24. LeetCode 347 Top K Frequent Elements - Solution

The core idea

3m

25. LeetCode 347 Top K Frequent Elements - Example and Complexity Analysis

Walkthrough and analysis

3m

26. LeetCode 347 Top K Frequent Elements - Implementation

The approach

4m1 problems

27. LeetCode 149 Max Points on Line - Problem Statement

The problem

3m1 problems

28. LeetCode 149 Max Points on Line - Why Naive Fails

Why brute force fails

3m

29. LeetCode 149 Max Points on Line - Solution

The pattern

4m

30. LeetCode 149 Max Points on Line - Example and Complexity Analysis

Walkthrough and analysis

3m

31. LeetCode 149 Max Points on Line - Implementation

The code

5m1 problems

32. Common Mistakes

Common errors to avoid

2m

33. Section Recap

Summary

1m

Practice Problems

Ready to start learning?

Access all 33 lessons with interactive content and progress tracking.