Skip to content

Tag Archives: cpp-containers-library

In C++, vectors are dynamic arrays, that can grow or shrink and their storage is handled by the container itself. There are two ways of… Read More
find(): The find() function is used to search the element in the given range and every STL container has the functionality to search the element… Read More
Prerequisite: C++ STL, Iterators in C++ STL The iterator is not the only way to iterate through any STL container. There exists a better and… Read More
We can create an object of one class into another and that object will be a member of the class. This type of relationship between… Read More
The rbegin() is a function in C++ STL. It returns a reverse iterator which points to the last element of the map. The reverse iterator… Read More
The rend() function is an inbuilt function in C++ STL which returns a reverse iterator pointing to the theoretical element right before the first key-value… Read More
The get_allocator() method of unordered_set is the part of Standard Template Library(STL) of C++. This method gets the stored allocator object and returns it. Syntax:… Read More
The deque::rend() is an inbuilt function in C++ STL which returns a reverse iterator which points to the position before the beginning of the deque… Read More
The multiset::upper_bound() is a built-in function in C++ STL that returns an iterator pointing to the immediate next element which is just greater than k.… Read More
The multiset::lower_bound() is a built-in function in C++ STL which returns an iterator pointing to the first element in the container which is equivalent to… Read More
The multiset::size() is a built-in function in C++ STL which returns the number of elements in the multiset container. Syntax: multiset_name.size() Parameters: The function does… Read More
The forward_list::max_size() is a built-in function in C++ STL which returns the maximum number of elements a forward_list container can hold Syntax: forward_list_name.max_size() Parameters: The… Read More
The multiset::max_size() is a built-in function in C++ STL which returns the maximum number of elements a multiset container can hold. Syntax: multiset_name.max_size() Parameters: The… Read More
The unordered_map::bucket() is a built-in STL function in C++ which returns the bucket number where the element with the key k is located in the… Read More
In STL, containers can change size dynamically. Allocator is an object that is responsible for dynamic memory allocation/deallocation. get_allocator() is used to allocate memory chunks… Read More