Skip to content

Glossary: Data Structures and Algorithms in C++

Hash set

Also written: std::unordered_set, unordered_set

A hash map with keys and no values. contains(x) and insert(x) are O(1) on average, so a `seen` set can find duplicates in one pass.

Where the book teaches it

Related terms

Hash mapvisited set