# Tag Archives: STL

## std::min_element in C++

For calculating the smallest of all the elements in a given list, we have std::min, but what if we want to find the smallest not… Read More »

## max_element in C++

We have std::max to find maximum of 2 or more elements, but what if we want to find the largest element in an array or… Read More »

## std::max in C++

std::max is defined in the header file <algorithm> and is used to find out the largest of the number passed to it. It returns the… Read More »

## std::is_sorted_until in C++

std::is_sorted_until is used to find out the first unsorted element in the range [first, last). It returns an iterator to the first unsorted element in… Read More »

## std::lcm in C++17

Competitive programming often involves computation of Least Common Multiple (LCM) of two numbers. One way of doing that is using boost::math::lcm(), which we discussed in… Read More »

## Adobe Interview Experience | Set 48 (On-Campus)

Coding Round: A variation of Knapsack Easy string manipulation problem A brute-force based string matching problem Technical Round 1: Finding the length of a Linked-List… Read More »

## std::min in C++

std::min is defined in the header file and is used to find out the smallest of the number passed to it. It returns the first… Read More »

## std::equal() in C++

std::equal() helps to compares the elements within the range [first_1,last_1) with those within range beginning at first_2. Syntax 1: template bool equal (InputIterator1 first1, InputIterator1… Read More »

std::advance advances the iterator ‘it’ by n element positions. Syntax : template void advance (InputIterator& it, Distance n); it : Iterator to be advanced n… Read More »

## std::search_n with example in C++

Prerequisite: std::search std::search_n is an STL algorithm defined inside the header file , which is used to search whether a given element satisfies a predicate… Read More »

## std::generate_n in C++

std::generate is an STL algorithm, which is used to generate numbers based upon a generator function, and then, it assigns those values to the elements… Read More »

## std::generate in C++

std::generate, as the name suggests is an STL algorithm, which is used to generate numbers based upon a generator function, and then, it assigns those… Read More »

## std::search in C++

std::search is defined in the header file <algorithm> and used to find out the presence of a subsequence satisfying a condition (equality if no such… Read More »

## lower_bound in C++

The lower_bound() method in C++ is used to return an iterator pointing to the first element in the range [first, last) which has a value… Read More »

## std::move_backward in C++

Moves the elements in the range [first,last] starting from the end into the range terminating at result. The function begins by moving *(last-1) into *(result-1),… Read More »