The C++ STL (Standard Template Library) is a generic collection of class templates and algorithms that allow programmers to easily implement standard data structures like queues, lists, and stacks. 
Here we are presenting all the content required to learn and Study C++ STL which is very important for Competitive Programming Point of View.

The C++ STL provides programmers with the following constructs, grouped into three categories:

If you are very new to the C++ STL then please go through the below articles to get some motivation and basic understanding of C++ after which you can follow on with the particular topic in C++ STL.
The idea behind the C++ STL is the hard part of using complex data structures has already been completed. If a programmer would like to use a stack of integers, all that he/she has to do is use this code:

stack<int> myStack;

With minimal effort, he/she can now push() and pop() integers onto this stack. Through the magic of C++ Templates, he/she could specify any data type, not just integers. the STL Stack class will provide generic functionality of stack, regardless of the data in the stack.
In addition, the STL also provides lots of useful algorithms like searching, sorting, and general-purpose iterating algorithms that can be used on a variety of data structures.


  • Saves lots of time during Contest.
  • Makes the code sort and readable for fast debugging.
  • Ready-made data structures and algorithms which are rigorously tested.


Hope that this will help you to learn and if there is any error or have any query then do drop a comment here and if found useful then do share with your friends.
Thank You