Skip to content

Glossary: Coding Interviews in C++

std::unordered_map and std::unordered_set

Also written: std::unordered_map, std::unordered_set, unordered_map, unordered_set

Hash-based containers with O(1) average lookup. A set answers "seen it?" with `contains`, and `counts[key]` on a map starts a missing key at 0.

Where the book teaches it

Related terms

Hash map / hash set