I know that in c++, the Set template stores the elements as a balanced red black tree. But I would like to know how would multiset store duplicate element. For example, it could store 1,1,2,3 as the following
1 / \ 1 2 \ 3 or as 1 \ 1 \ 2 \ 3
1 / \ 1 2 \ 3
1 \ 1 \ 2 \ 3
Aucun commentaire:
Enregistrer un commentaire