Standard Template Library (STL)
STL Overview
Introduction to containers, iterators, algorithms
std::vector
Dynamic array container
std::list
Doubly linked list — O(1) insertion/deletion anywhere with iterator stability
std::deque
Double-ended queue with O(1) push/pop at both ends and random access
std::stack and std::queue
LIFO and FIFO container adaptors built on top of other containers
std::priority_queue
Max-heap by default — O(log n) push/pop, O(1) top access
std::set and std::multiset
Ordered tree-based containers for unique (set) or duplicate (multiset) sorted elements
std::map and std::multimap
Ordered key-value pairs in a red-black tree — O(log n) operations with sorted iteration
Unordered Containers
Hash-based unordered_set and unordered_map with O(1) average operations
Iterators
Generalized pointers for traversing STL containers — the glue between containers and algorithms
STL Algorithms
Generic algorithms that operate on ranges via iterators — sort, find, transform, and more
std::pair and std::tuple
Lightweight heterogeneous aggregates for grouping multiple values
std::optional and std::variant
C++17 sum types — optional values and type-safe tagged unions
Ranges (C++20)
Lazy, composable range-based algorithms and views — the modern STL