Learn C++ STL
- Lessons
- 164
- Modules out
- 19 of 19
- Parts
- 6
Who can read what
- Free · 41
- Anyone can read it, signed in or not.
- Free with an account · 60
- Free to read once you have an account.
- Pro · 63
- Included with this track or with Learn Pro.
Learn Pro
Every track, one subscription
Every track's Pro lessons and projects
৳6,999 a year
By card: $9 a month or $59 a year.
What is inside
19 modules in 6 parts, 19 of them out so far. Lessons with no mark are free to read.
Part Zero
What the STL is
- 1The STL in One Picture: Four Kinds of ThingReading
- 2Why It Matters: Fewer Lines, Fewer Bugs, Known CostsReading
- 3The Containers at a Glance: What Each One Is Good AtReading
- 4Iterators and Algorithms: How the Pieces ConnectReading
- 5How to Read cppreference, and What O(log n) PromisesReading
- 6Module Test: What the STL IsModule test
- 1Hello, C++: The Same Program in Both LanguagesReading
- 2Fast Input and Output: Why Contest Code Starts the Same WayReading
- 3References: A Second Name for the Same BoxReading
- 4auto and the Range-for: Less Typing, Same MeaningReading
- 5Templates, the Idea: One Function, Every TypeReading
- 6pair and tuple: Two or More Things With One NameReading
- 7std::, Namespaces and the Headers You Will Actually IncludeReading
- 8Problems: Just-Enough C++Problems
- 9Module Test: Just-Enough C++Module test
Part One
Sequence containers
- 1vector: Many Boxes That Grow by ThemselvesReading
- 2Every vector Operation, One by One, With Its CostReading
- 3Full Programs: From Five Lines to a Real ToolReading
- 4When to Use vector and When Not ToReading
- 5Under the Hood: How a vector Grows, and What That BreaksProReading
- 6CP and Interview Pack: vector Patterns, Questions and the Bug GalleryProReading
- 7Problems: vectorProblems
- 8Cheat Sheet: vector on One PageProReading
- 9Module Test: vectorModule test
- 1string: A Row of Characters That Knows Its Own LengthReading
- 2Every string Operation, One by One, With Its CostReading
- 3Full Programs: From One Word to a Text ReportReading
- 4When to Use string and When Not ToReading
- 5Under the Hood: The Small String Buffer, Growth and the Cost of +ProReading
- 6CP and Interview Pack: string Patterns, Questions and the Bug GalleryProReading
- 7Problems: stringProblems
- 8Cheat Sheet: string on One PageProReading
- 9Module Test: stringModule test
- 1array and deque: A Size You Fix, and a Line That Grows at Both EndsReading
- 2Every array and deque Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a Week of Readings to a Ticket LineFree with an accountReading
- 4When to Use array, deque or vector, and When Not ToFree with an accountReading
- 5Under the Hood: deque's Blocks and Map, and What a Push BreaksProReading
- 6CP and Interview Pack: array and deque Patterns, Questions and the Bug GalleryProReading
- 7Problems: array and dequeFree with an accountProblems
- 8Cheat Sheet: array and deque on One PageProReading
- 9Module Test: array and dequeFree with an accountModule test
- 1list: A Chain of Nodes You Can Cut and Rejoin AnywhereReading
- 2Every list and forward_list Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a To-do List to an LRU CacheFree with an accountReading
- 4When to Use list or forward_list, and Why the Answer Is Usually NoFree with an accountReading
- 5Under the Hood: list's Nodes, the Sentinel, and What a Walk Really CostsProReading
- 6CP and Interview Pack: list Patterns, Questions and the Bug GalleryProReading
- 7Problems: list and forward_listFree with an accountProblems
- 8Cheat Sheet: list and forward_list on One PageProReading
- 9Module Test: list and forward_listFree with an accountModule test
Part Two
Adaptors
- 1stack and queue: The Newest Leaves First, or the OldestReading
- 2Every stack and queue Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From Reversing a Line to a Shortest PathFree with an accountReading
- 4When to Use stack, queue or a Plain vector, and When Not ToFree with an accountReading
- 5Under the Hood: The Container Inside, and Why pop Returns NothingProReading
- 6CP and Interview Pack: stack and queue Patterns, Questions and the Bug GalleryProReading
- 7Problems: stack and queueFree with an accountProblems
- 8Cheat Sheet: stack and queue on One PageProReading
- 9Module Test: stack and queueFree with an accountModule test
- 1priority_queue: The Largest Leaves First, Whenever It CameReading
- 2Every priority_queue Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From the Top Three Scores to a Shortest RouteFree with an accountReading
- 4When to Use priority_queue, and When a Sort or a set Is BetterFree with an accountReading
- 5Under the Hood: The Heap Inside a vector, the Sift Arithmetic and make_heapProReading
- 6CP and Interview Pack: priority_queue Patterns, Questions and the Bug GalleryProReading
- 7Problems: priority_queueFree with an accountProblems
- 8Cheat Sheet: priority_queue on One PageProReading
- 9Module Test: priority_queueFree with an accountModule test
Part Three
Associative containers
- 1set: Sorted, No Repeats, and Found in a Few StepsReading
- 2Every set and multiset Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From Dice Rolls to a Running MedianFree with an accountReading
- 4When to Use set, a Sorted vector or a Hash Set, and When Not ToFree with an accountReading
- 5Under the Hood: The Tree's Nodes, Its Height, and Iterators That StayProReading
- 6CP and Interview Pack: set Patterns, Questions and the Bug GalleryProReading
- 7Problems: set and multisetFree with an accountProblems
- 8Cheat Sheet: set and multiset on One PageProReading
- 9Module Test: set and multisetFree with an accountModule test
- 1map: Each Key Holds a Value, and the Keys Stay SortedReading
- 2Every map and multimap Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a Word Count to a Grade TableFree with an accountReading
- 4When to Use map, a Sorted vector of Pairs or a Plain Array, and When Not ToFree with an accountReading
- 5Under the Hood: A Pair in Every Node, and What a Miss CostsProReading
- 6CP and Interview Pack: map Patterns, Questions and the Bug GalleryProReading
- 7Problems: map and multimapFree with an accountProblems
- 8Cheat Sheet: map and multimap on One PageProReading
- 9Module Test: map and multimapFree with an accountModule test
- 1unordered_set and unordered_map: Jump Straight to the Right BucketReading
- 2Every unordered_set and unordered_map Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a Door List to a Symbol TableFree with an accountReading
- 4When to Use a Hash Container, a Tree or a Plain Array, and When Not ToFree with an accountReading
- 5Under the Hood: Chained Buckets, Prime Counts and the Anti-Hash TestProReading
- 6CP and Interview Pack: Hash Patterns, Questions and the Bug GalleryProReading
- 7Problems: unordered_set and unordered_mapFree with an accountProblems
- 8Cheat Sheet: unordered_set and unordered_map on One PageProReading
- 9Module Test: unordered_set and unordered_mapFree with an accountModule test
Part Four
Iterators and algorithms
- 1Iterators: A Position That Knows How to MoveReading
- 2Every Iterator Operation, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a Backwards Playlist to Reading Every NumberFree with an accountReading
- 4When to Use an Iterator, an Index or a Range-for, and When Not ToFree with an accountReading
- 5Under the Hood: An Iterator Is a Wrapped PointerProReading
- 6CP and Interview Pack: Iterator Patterns, Questions and the Bug GalleryProReading
- 7Problems: IteratorsFree with an accountProblems
- 8Cheat Sheet: Iterators on One PageProReading
- 9Module Test: IteratorsFree with an accountModule test
- 1sort: Put Things in Order, and Say Which Order You MeanReading
- 2Every Sorting Call and Every Way to Write the Rule, With Its CostFree with an accountReading
- 3Full Programs: From a Race Table to a priority_queue That Takes Your RuleFree with an accountReading
- 4When to Sort, and When a set, a priority_queue or Counting Does It BetterFree with an accountReading
- 5Under the Hood: Introsort, Comparator Calls and What a Lambda CostsProReading
- 6CP and Interview Pack: Sort Patterns, Questions and the Bug GalleryProReading
- 7Problems: sort, Comparators and LambdasFree with an accountProblems
- 8Cheat Sheet: sort, Comparators and Lambdas on One PageProReading
- 9Module Test: sort, Comparators and LambdasFree with an accountModule test
- 1Binary Search: Halve a Sorted Row Until One Place Is LeftReading
- 2Every Binary Search Call, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a Price Check to Binary Search on the AnswerFree with an accountReading
- 4When to Use Binary Search, a set, a Hash or a Plain Scan, and When Not ToFree with an accountReading
- 5Under the Hood: GCC's Halving Loop, Branches and the CacheProReading
- 6CP and Interview Pack: Binary Search on the Answer, LIS and the Bug GalleryProReading
- 7Problems: binary_search, lower_bound, upper_bound and equal_rangeFree with an accountProblems
- 8Cheat Sheet: Binary Search and the Bounds on One PageProReading
- 9Module Test: binary_search, lower_bound, upper_bound and equal_rangeFree with an accountModule test
- 1Algorithms: One Call Instead of a Loop, and Every Order of a SetReading
- 2Every Algorithm in the Weekly Set, One by One, With Its CostFree with an accountReading
- 3Full Programs: From a One-Line Average to the k-th SmallestFree with an accountReading
- 4When to Use an Algorithm, and When a Plain Loop Is ClearerFree with an accountReading
- 5Under the Hood: Introselect, next_permutation's Four Moves and the Sum That WrapsProReading
- 6CP and Interview Pack: Brute Force by Permutation, Prefix and Difference Arrays, the k-th Order StatisticProReading
- 7Problems: Numeric and Other AlgorithmsFree with an accountProblems
- 8Cheat Sheet: The Weekly Algorithms on One PageProReading
- 9Module Test: Numeric and Other AlgorithmsFree with an accountModule test
- 1A Row of Switches You Can Move TogetherReading
- 2Every bitset Operation, One by One, With Its CostFree with an accountReading
- 3Five Programs That Give Each Bit a JobFree with an accountReading
- 4Choose the Representation Before Chasing SpeedFree with an accountReading
- 5Words, Padding, and a Sieve Performance LabProReading
- 6Contest Patterns, Interview Answers, and Bugs You Can ReproduceProReading
- 7Problems: bitset and Bit TricksFree with an accountProblems
- 8bitset Quick ReferenceProReading
- 9Module Test: bitset and Bit TricksFree with an accountModule test
Part Five
The STL in the real world (Pro)
- 1Which Container Answers Your Next Question?Reading
- 2Sliding Windows and Two Pointers, With Their ProofsProReading
- 3Dijkstra: Roads, Current Distances, and Stale Heap EntriesProReading
- 4Coordinate Compression and a Budget for Your AlgorithmProReading
- 5Changing Ranks With GCC pb_ds, and What a Plain Set Cannot PromiseProReading
- 6Six Contest Patterns, Six Interview Answers, and Six BugsProReading
- 7Problems: The STL in Competitive ProgrammingProProblems
- 8STL in CP: the Container and Pattern Cost SheetProReading
- 9Module Test: The STL in Competitive ProgrammingProModule test
- 1Six Layouts, Two Kinds of SizeReading
- 2Every Operation, With Its QualifierProReading
- 3Cache, Equal Work, and One Measured LabProReading
- 4The Complete Handle Invalidation TableProReading
- 5Allocators, One Pool, and a Cheap Vector ReturnProReading
- 6Four Workloads, Six Interview Answers, and Five BugsProReading
- 7Problems: Under the HoodProProblems
- 8Iterator Invalidation: the Desk SheetProReading
- 9Module Test: Under the HoodProModule test
Learn Pro
Every track, one subscription
Every track's Pro lessons and projects
৳6,999 a year
By card: $9 a month or $59 a year.
Certificates
How certificates work
A certificate is not issued for finishing the lessons. It is issued on a Skill Test.
The Skill Test is open. Your first attempt on each track is free and gives you a score and a band you can share. The Skill Certificate is the paid step: it is issued on a score of 600 or more, and buying it first gives you the attempts to earn it.
Timed, in the browser
Questions are drawn at random from a large pool, and the clock runs from the first one.
Your code, hidden tests
Your code runs against tests you cannot see, and submissions are compared for similarity afterwards.
A score, not a tick
The score, 0 to 1000, is printed on the certificate with the band it falls in.
Not proctored, and it says so. Identity is the account and the name on the certificate. There is no webcam and no ID check, and the certificate and its verify page both state that.
Score bands
Score is 0 to 1000, across three sections: concepts, read and debug, build.
- Not yetRetake0–399
- FoundationRetake400–599
- WorkingCertificate issued600–749
- ProficientCertificate issued750–899
- AdvancedCertificate issued900–1000
For employers
Hiring someone?
Every certificate has a public page carrying the score, the three sections, the date and the test version. Ask for the link, not a screenshot.
- Name
- Track
- Learn C++ STL
- Score
- / 1000, with its band
- Sections
- Concepts · Read and debug · Build
- Date, version