What is the main difference between a set and a vector in the STL?
A set is an ordered container, while a vector is an unordered container.
A set stores only unique elements, while a vector can store duplicate elements.
A set has constant time complexity for element insertion, while a vector has linear time complexity.
A set has constant time complexity for element access, while a vector has linear time complexity.
This question is part of this quiz :
C++ Set and Multiset