##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Store key-value pairs and unique collections. Learn maps and sets for lookups and deduplication.
Section Overview
Basic concept
How to declare
How to add entries
Knowledge check
How to get values
Does key exist?
Key-value storage
Processing all entries
Test your understanding
Deleting map entries
Two map types
Key-value storage
Knowledge check
Collection basics
How to declare
Unique elements
How to add
Is element present?
Unique elements
Knowledge check
Processing elements
How to delete
Unique elements
Two set types
Non-unique sets
Unique elements
Non-unique maps
Finding ranges
Key-value storage
Knowledge check
Counting occurrences
Unique elements only
Key-value storage
Classic problem
Character tracking
Grouping pattern
Knowledge check
Custom sorting
Using sets for uniqueness
Automatic deduplication
Breaking it down
Key-value storage
Complete solution
summary
Using maps for counting
Counting occurrences
Breaking it down
Key-value storage
Complete solution
summary
What we learned