unordered_multiset
unordered_multiset (정렬되지 않은 다중 집합)
std::unordered_multiset은 중복을 허용하는 정렬되지 않은 집합 컨테이너예요. Key 타입의 객체들을 해시 테이블에 저장하며, 평균적으로 상수 시간에 탐색·삽입·삭제가 가능해요.
출처: cppreference
본문
std::unordered_multiset은 타입 Key의 객체를 담는 연관 컨테이너예요. 같은 값이 여러 개 존재할 수 있는 비유일(non-unique) 집합이에요. 해시 함수로 버킷을 결정하기 때문에 요소 순서는 정의되지 않아요.
template<
class Key,
class Hash = std::hash<Key>,
class KeyEqual = std::equal_to<Key>,
class Allocator = std::allocator<Key>
> class unordered_multiset;
탐색·삽입·제거가 평균 상수 시간으로 동작해요. 요소의 순서가 중요하지 않고 중복을 허용하는 집합이 필요할 때 써요.