Learn how associative containers store elements that can be addressed by their content, rather than their location or index, and how these containers are sets, multisets, maps, and multimaps. Explore these classes from a logical point of view.
- [Narrator] Now, let's get to know associative containers.…Since we only care about the logical operation,…rather than the implementation of these containers,…the following explanation applies…to both ordered associative containers…and unordered associative containers.…First, a set is a model of a mathematical set,…which is a collection of unique elements that serve us keys.…This means that if you try to insert some element twice,…the set will not change the second time…because it already has an element with that key value.…
There are four variants of sets,…which come from two aspects.…First, sets can be ordered or unordered.…Ordered sets are implemented as binary trees,…whereas unordered ones must be implemented as hash tables.…The second aspect is whether you want…to support duplicate elements.…If so, you'll have to use a multiset, or a bag,…as it's also know in discrete mathematics.…
Due to these variations, there are four types…of set implementations in the C++ STL.…Regular set, regular multiset,…unordered set, and unordered multiset.…
- Why the STL is important
- Containers and iterators
- Vectors and lists
- Stacks and dequeues
- Associative containers
Skill Level Advanced
1. The Standard Template Library
2. Vectors and Lists
3. Stacks, Queues, and Deques
4. Associative Containers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.