7.1 Sequence Containers: vector, deque, list, array
vector (dynamic array), deque (double-ended), list (doubly linked), array (fixed). When to use each. Internal implementation, time complexities, and iterator invalidation rules.
7.2 Associative Containers: set, map, multiset, multimap
Ordered containers backed by red-black trees. O(log n) insert/find. Key uniqueness rules. Custom comparators. Practical use: frequency maps, sorted storage, interval problems.
7.3 Unordered Containers: unordered_map, unordered_set
Hash-table-backed O(1) average insert/find. Hash functions, bucket structure, load factor. When unordered beats ordered (and when it doesn't — worst case O(n)). Custom hash for pairs/structs.
7.4 Container Adaptors: stack, queue, priority_queue
Stack (LIFO), queue (FIFO), priority_queue (max-heap by default). Custom comparator for min-heap: priority_queue<int, vector<int>, greater<int>>. Dijkstra's algorithm uses this.
7.5 Iterators
Iterator categories: input, output, forward, bidirectional, random access. begin/end, rbegin/rend, cbegin/cend. Iterator arithmetic. Range-based for as iterator sugar.
7.6 STL Algorithms
sort, stable_sort, binary_search, lower_bound, upper_bound, find, count, accumulate, transform, for_each, next_permutation, min_element, max_element. The 20 algorithms every competitive programmer memorises.
7.7 Pairs, Tuples & Structured Bindings
std::pair for key-value storage, std::tuple for multiple returns, structured bindings (C++17): auto [x, y] = myPair; Practical use in graph edges, coordinate pairs, function returns.
7.8 Strings: std::string In-Depth
String operations: substr, find, rfind, replace, compare. String streams (stringstream) for parsing. to_string and stoi/stof for conversions. String vs char[] — always prefer std::string in C++.
Placement relevance: STL is THE competitive programming toolkit. Every coding contest and product company interview expects fluency with vector, map, set, priority_queue, and the sort/binary_search family. This module is non-negotiable for placement coding rounds.