Maps & Sets

Store key-value pairs and unique collections. Learn maps and sets for lookups and deduplication.

52 lessons
200 min

Lessons

1. Intro

Section Overview

4m

2. What is a Map?

Basic concept

4m

3. Creating Maps

How to declare

4m

4. Inserting Elements

How to add entries

4m

5. Quiz: Map Insertion

Knowledge check

3m1 problems

6. Accessing Elements

How to get values

4m

7. Checking Key Existence

Does key exist?

4m

8. Quiz: Key-value storage

Key-value storage

3m1 problems

9. Iterating Over Maps

Processing all entries

4m

10. Quiz: Map Iteration

Test your understanding

3m1 problems

11. Erasing Elements

Deleting map entries

4m

12. Map vs Unordered Map

Two map types

5m

13. Quiz: Key-value storage

Key-value storage

3m1 problems

14. Quiz: Map Choice

Knowledge check

3m1 problems

15. What is a Set?

Collection basics

4m

16. Creating Sets

How to declare

4m

17. Quiz: Unique elements

Unique elements

3m1 problems

18. Inserting into Sets

How to add

4m

19. Checking Membership

Is element present?

4m

20. Quiz: Unique elements

Unique elements

3m1 problems

21. Quiz: Set Membership

Knowledge check

3m1 problems

22. Iterating Over Sets

Processing elements

4m

23. Erasing from Sets

How to delete

4m

24. Quiz: Unique elements

Unique elements

3m1 problems

25. Set vs Unordered Set

Two set types

4m

26. Multiset

Non-unique sets

4m

27. Quiz: Unique elements

Unique elements

3m1 problems

28. Multimap

Non-unique maps

4m

29. Lower and Upper Bound

Finding ranges

4m

30. Quiz: Key-value storage

Key-value storage

3m1 problems

31. Quiz: Set Operations

Knowledge check

3m1 problems

32. Frequency Counting

Counting occurrences

4m

33. Deduplication

Unique elements only

4m

34. Quiz: Key-value storage

Key-value storage

3m1 problems

35. Two Sum Problem

Classic problem

4m1 problems

36. Unique Characters

Character tracking

4m

37. Group Anagrams

Grouping pattern

4m

38. Quiz: Problem Solving

Knowledge check

3m1 problems

39. Custom Comparators

Custom sorting

4m

40. Problem - Boy or Girl

Using sets for uniqueness

4m1 problems

41. Boy or Girl - The Idea

Automatic deduplication

4m

42. Boy or Girl - Algorithm

Breaking it down

4m

43. Quiz: Key-value storage

Key-value storage

3m1 problems

44. Boy or Girl - Implementation

Complete solution

7m1 problems

45. Lessons from Boy or Girl

summary

4m

46. Problem - Registration System

Using maps for counting

4m1 problems

47. Registration - The Idea

Counting occurrences

4m

48. Registration - Algorithm

Breaking it down

4m

49. Quiz: Key-value storage

Key-value storage

3m1 problems

50. Registration - Implementation

Complete solution

7m1 problems

51. Lessons from Registration

summary

4m

52. Section Recap

What we learned

5m

Ready to start learning?

Access all 52 lessons with interactive content and progress tracking.