vector list deque array forward_list
dequeis not guaranteed to store all its elements in contiguous storage locations but has efficient insertion and deletion of elements at the beginning and end of a sequence.
- Unlike the other standard containers,
arrayhas a fixed size.
- Forward lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence.
forward_listhas been designed with efficiency in mind. By design, it is as efficient as a simple handwritten C-style singly-linked list, and in fact is the only standard container to deliberately lack a size member.
stack queue priority_queue
- By default, if no container class is specified for a particular
priority_queueclass instantiation, the standard container
- priority_queue is a heap
set map multiset multimap
mapare typically implemented as binary search trees.
mapis generally slower than
unordered_mapcontainers to access individual elements by their key, but it allows the direct iteration on subsets based on their order.
Unordered associative containers
unordered_multiset unordered_map unordered_multimap unordered_set
unordered_setis faster than
setcontainers to access individual elements by their key.