AlgoScope

Frequency Map / Hashing

PatternbeginnerPatterns

Recognize it for counting, grouping, anagram and "seen before" questions.

Decision · step 2 of 6Frequency Map: First value seen before
307112733495i

3 is not in the set. Add it and move on. 1 distinct so far.

Open in the player →or start at step 2

What you will see

A count table beside the data; each element bumps its count.

How frequency map works →

Cost

BestO(n)
AverageO(n)
WorstO(n)
SpaceO(k)

How you work with it here

play it through, step one change at a time, run it on your own input, predict what happens next.

Screen readers: Pattern lessons reuse the canonical algorithm's semantics and add a spoken "recognize this when" cue.

Reduced motion: Inherits the canonical algorithm's strategy.

Before this

Leads to

Topics that need this one first.