Objects/Maps/Dictionaries

Key-value storage for fast lookups.

Do this: Read the concept below, then try the quiz or activity.

Lesson 14 of 20
65%

Concept

Dictionaries store values by key. Great for counting, grouping, and caches. Beware of missing keys and default values.

Match tasks to best structure

Unsorted
Counting word frequencies
Maintaining unique IDs
Preserving insertion order list
Fast membership check
Dictionary/Map
Set
Array/List