C++: STL std::multiset
Multiple-key set
Multisets are containers that store elements following a specific order, and where multiple elements can have equivalent values.
Compared with unordered_multiset
multiset containers are generally slower than unordered_multiset containers to access individual elements by their key, but they allow the direct iteration on subsets based on their order.