An associative container that contains pairs of key-value elements in which multiple values can be mapped to the same key. Descends from unordered_map data structure and have similar complexity in operations.
An unordered_multimap
is a special kind of unordered_map
in which multiple values can be mapped to the same key.
It's purpose and implementation is similar to an unordered_map
:
- the container doesn't guarantee any specific order of the elements
- key-value pairs are stored into buckets
- checking if a specific key has at least a value has constant complexity
- checking if a specific key has a specific value has linear complexity relative to the amount of values mapped to the specific key