Which of the following containers in the Standard Template Library (STL) allows duplicate elements and keeps them in sorted order? 

  • std::vector 
  • std::set 
  • std::unordered_set 
  • std::multiset
The std::multiset container in the STL allows duplicate elements and keeps them in a sorted order based on their values. Unlike std::set, which ensures each element is unique, std::multiset allows storage of multiple instances of equivalent elements.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *