Skip to content

GitDhamani/Using-STL-Containers

Repository files navigation

Using-STL-Containers

The Standard Template Library (STL) for C++ 17 comes with many containers to get the job done. Here I have provided code on how to use each one to do typical tasks such as inserting, removing and deleting elements and the important case of traversing through them. Covered here the STL Containers: Array, Vector, Deque, List, Forward List, Set, Map (Like a Hash Map), String, Stack, Queue, Priority Queue.

Some Containers, depending on their nature and underlying implementation and how contiguous their memory structures are, only allow certain types of iterator (ie forward or backward), ie a forward list. So take this into account when iterating through their values.

With such containers as the basis of your data structures, you can implement further complex algorithms, such as Binary Search Trees.

About

How to Use the C++17 STL Containers such as Arrays, Vectors, Lists, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages