DISCLOSURE: This post contains affiliate links, meaning when you click the links and make a purchase, we receive a commission.
Standard Template Library Interview Questions and Tutorials
Vector Interview Questions and Tutorials
- What’s std::vector and why should I use std::vector?
- 5 Different ways to Initialize a vector
- How to Iterate or Loop over a Vector?
- How to Iterate over a Vector in Reverse Order ( Backward direction )
- How does std::vector works internally ?
- How to fill a vector with random numbers in C++
- Importance of Constructors while using User Defined Objects with std::vector
- How to use vector efficiently in C++?
- std::vector and Iterator Invalidation
- Remove all occurences of an element from vector in O(n) complexity
- Be careful with hidden cost of std::vector for user defined objects
- Add elements in vector using vector::push_back
- How to Print all elements of a vector in C++
- How to initialize two dimensional Vector in C++ - (Initializing 2D Vectors / Matrix)
- How to print Two Dimensional (2D) Vector in C++ ?
- C++: Convert Array to Vector (7 Ways)
- C++: Convert vector to array (4 Ways)
- C++: Convert Set to Vector
- C++: Convert Vector to Set ( 5 Ways )
- C++: Print a vector in reverse order (5 Ways)
Deque Interview Questions and Tutorials
List Interview Questions and Tutorials
- std::list Tutorial and Usage Details
- Vector vs List
- Different Ways To Initialize a List
- Erase elements from List using Iterators
- Removing elements from a List based on Criterion
- Remove Elements from a List while Iterating
- How to get element by index in List ?
- How to search an element in std::list ?
Set Interview Questions and Tutorials
- Set usage details with default sorting criteria
- Using std::set with user defined classes
- std::set and external Sorting criteria | Comparator
- How to access an element by index in Set
- Different ways to insert elements in Set
- How to Iterate over a Set in C++
- Removing an element from Set using different techniques.
- Erase elements while Iterating over Set & Generic erase_if()
Map Interview Questions and Tutorials
- std::map Tutorial Part 1: Usage Detail with examples
- std::map Tutorial -Part 2: std::map and External Sorting Criteria / Comparator
- std::map Tutorial – Part 3: Using User defined class objects as keys in std::map
- Set vs Map : How to choose a right associative container ?
- How to Insert elements in a map
- How to Iterate over a map in C++
- Map Insert Example
- Iterate a map in reverse order
- Check if a key exists in a Map
- Search by value in a Map
- C++ Map :Â Erase by Key | Iterators
- C++ Map : Operator []
- C++ Map :Â Erase by Value or callback
- Using STL to verify brackets or parentheses combination in an expression
Unordered_map Interview Questions and Tutorials
- Basic Usage Detail and Example
- Initializing an unordered_map
- Searching in unordered_map
- Insert elements in unordered_map
- Erasing an element
- Erase elements while iterating
- std::map vs std::unordered_map
Unordered_set Interview Questions and Tutorials
- Unordered_set Basic Example
- Initializing an unordered_set
- Inserting elements in an unordered_set
- Searching an element in unordered_set
- Unordered_set – Custom Hasher & Comparator
- Unordered_set & User defined classes
STL Algorithm Interview Questions and Tutorials
- Using std::find & std::find_if with User Defined Classes
- Iterating over a range of User Defined objects and calling member function using std::for_each
- std::for_each Tutorial : Usage Details with Examples
Thank you for detailed answers for STL questions. It helps a lot to understand STL internals.
Thanks for appreciating.
Good examples and sufficient explanations. Very good for quick revision.
Thanks for appreciating.
great one for STL!!!!
Topics are well explained with examples. Thank you for sharing.
Good content of STL.
I am a pro cs player how to apply that in coding?
Great Articles !!!!
It really helped me a lot while learning STL.
Thanks!!!
NICE WRITE STL CONCEPT
nice work it helps a lot to understand STL for competitive programming.
Very good explanation of STL. Thank you.
nice concepts sir thanks a lot
great work
good topics and good samples! they all are helpful to me!
thank you.
it will be my pleasure to do something for this great website.
-regards,
frank
The best medium to learn STL !!
I appreciate the effort. Very helpful.
Thanks.