English
Topic 13. Standard library containers: vector, list, deque, set, map, unordered_map
Goal: learn to choose containers by their operations, implement a custom ordering, and test lookup, duplicates, and empty states.
Lecture contents
- Sequence containers — A container as an access model · Complexity and actual cost · vector, array, and span · deque, list, and
forward_list· pair, tuple, and structured bindings - Associative and hash containers — set and map: uniqueness through ordering · Unordered containers and hashing · A custom key and a consistent hash
- Adapters and new interfaces — Adapters: a restricted interface as an advantage · New interfaces and checking support · Checking the choice in practice
- Case studies and common mistakes — Scenario walkthrough: a catalog and two independent orders · Common mistakes reproduced with small traces · A plan for a reproducible complexity experiment · Checking invariants after an operation