Skip to content

Glossary: Data Structures and Algorithms in C++

std::map

Also written: map, ordered map

A sorted, tree-based key-value map with O(log n) operations, in contrast to the O(1) average of unordered_map. It needs only < on its keys, so a std::pair can be a key.

Where the book teaches it

Related terms

Hash mapSelf-balancing tree