Guided lesson

Two Sum

Hashing

See the input

Beginner

Input for Two Sum: Store seen values in a hash map and look for the complement of each value.

key
cat
slot 2
key
dog
slot 3
key
target
slot 4
key
seen
slot 5
Step 1 O(n) time - O(n) space
Guided progression
6% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart