Daily bit(e) of C++ | std::unordered_(multi)map, std::unordered_(multi)set
Daily bit(e) of C++ #450, Unordered containers with O(1) complexity for find, insert, erase: std::unordered_(multi)map, std::unordered_(multi)set.
The standard library provides two unordered containers: std::unordered_map and std::unordered_set (and their multi_ variants that allow multiple instances of the same key).
These containers provide average O(1) complexity for find, insert and erase operations.
Both containers are node-based, typically providing worse performance than 3rd party flat-hash-map implementations.