Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.7K+ articles
C++
3.8K+ articles
C++ Programs
1.5K+ articles
STL
1.3K+ articles
CPP-Functions
619+ articles
cpp-vector
375+ articles
cpp-map
287+ articles
CPP-Library
254+ articles
cpp-containers-library
93+ articles
cpp-iterator
56 posts
Recent Articles
How to Iterate Through a Vector in C++?
Last Updated: 23 July 2025
Iterating or traversing a vector means accessing each element of the vector sequentially. In this article, we will learn different methods to iterate over a vector in C++....
read more
C++ Programs
C++
cpp-iterator
STL
cpp-vector
CPP Examples
Iterators Operations in C++
Last Updated: 29 June 2026
Iterator operations in C++ provide various ways to work with elements stored in STL containers. These operations make iterators powerful tools for traversing, accessing, a...
read more
C++
cpp-iterator
STL
string::rbegin() and string::rend() in C++
Last Updated: 23 July 2025
The std::string::rbegin() and std::string::rend() functions in C++ are used to fetch the reverse iterators to the string. They are the member function of std::string and a...
read more
C++
cpp-iterator
STL
cpp-string
Why are Standard Iterator Ranges [begin, end) Instead of [begin, end]?
Last Updated: 23 July 2025
In C++, the Standard Template Library (STL) uses a half-open range convention [begin, end) for iterator ranges. This means the range includes the begin iterator but exclud...
read more
C++
Picked
cpp-iterator
STL
Iteration Over std::vector: Unsigned vs Signed Index Variable
Last Updated: 23 July 2025
When we iterate over a std::vector in C++, we need to choose the right type for the index variable to maintain both the correctness and clarity of our code. A common quest...
read more
C++
Picked
cpp-iterator
STL
cpp-vector
Why Use Iterators Instead of Array Indices?
Last Updated: 23 July 2025
In C++, both iterators and array indices are used to access and manipulate elements in a container, such as arrays, vectors, and lists. However, one common question that a...
read more
C++
Picked
cpp-iterator
STL
cpp-array
How to Implement Iterator for a Doubly Linked List in C++?
Last Updated: 23 July 2025
In C++, iterators are used to access elements of a container sequentially without exposing the underlying representation. When working with data structures like a doubly l...
read more
C++ Programs
C++
Picked
cpp-iterator
CPP Examples
How to Traverse Vector using const_iterator in C++?
Last Updated: 23 July 2025
In C++, a const_iterator is a type of iterator that points to constant content means by using a const_iterator, we can read from but cannot write to the element it points ...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-vector
CPP Examples
How to Traverse a List with reverse_iterator in C++?
Last Updated: 23 July 2025
In C++, lists arecontainers that allow users to store data in non-contiguous memory locations.List provides reverse iterators that make it easy to traverse the list in rev...
read more
C++ Programs
C++
Picked
cpp-iterator
cpp-list
CPP Examples
How to Traverse a List with const_iterator in C++?
Last Updated: 23 July 2025
In C++, a list is a container used to store data in non-contiguous memory locations. It also provides a constant iterator that provides the constant reference to its eleme...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-list
CPP Examples
How to Find Last Occurrence of an Element in a Deque in C++?
Last Updated: 23 July 2025
In C++, deques also known as double-ended queues are sequence containers that allow the users to insert and delete elements from both ends efficiently. In this article, we...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-deque
CPP Examples
How to Access First Element in a Vector Using Iterator in C++?
Last Updated: 23 July 2025
In C++, vectors are containers similar to arrays but unlike arrays, vectors can resize themselves during the runtime. These vectors provide iterators to access their eleme...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-vector
CPP Examples
How to Traverse Vector Using const_reverse_iterator in C++?
Last Updated: 23 July 2025
In C++, a vector can be traversed in reverse order using a const_reverse_iterator. A const_reverse_iterator is a type of iterator that points to the last element in the co...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-vector
CPP Examples
How to Use a reverse_Iterator with a Map in C++?
Last Updated: 23 July 2025
In C++, a reverse_iterator is a type of iterator that points to elements in a container in the reverse order. This means that using a reverse_iterator, you can traverse a ...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-map
CPP Examples
How to Use const_iterator with a Map in C++?
Last Updated: 23 July 2025
In C++, a const_iterator is a type of iterator that points to constant content. This means that using a const_iterator, you can read from but not write to the element it p...
read more
C++ Programs
C++
Picked
cpp-iterator
STL
cpp-map
CPP Examples
1
2
3
4
✕