Loading lesson path
C++
C++ Data Structures focused on C++ Data Structures and STL and related concepts.
Data structures are used to store and organize data. An array is an example of a data structure, which allows multiple elements to be stored in a single variable.
A vector in C++ is like a resizable array .
A list is similar to a vector in that it can store multiple elements of the same type and dynamically grow in size.
A stack stores multiple elements in a specific order, called LIFO .
A queue stores multiple elements in a specific order, called FIFO .
A deque (stands for d ouble- e nded queue ) however, is more flexible, as elements can be added and removed from both ends (at the front and the back). You can also access elements by index numbers.
A set stores unique elements where they:
A map stores elements in " key/value " pairs.
Iterators are used to access and iterate through elements of data structures ( vectors , sets , etc.), by " pointing " to them.
In the previous chapters, you learned that data structures (like vectors , lists , etc) are used to store and organize data.