# Tag Archives: cpp-algorithm-library (adsbygoogle = window.adsbygoogle || []).push({});

## std::inner_product in C++

Compute cumulative inner product of range Returns the result of accumulating init with the inner products of the pairs formed by the elements of two… Read More »

## std::set_union in C++

Union of two sorted ranges The union of two sets is formed by the elements that are present in either one of the sets, or… Read More »

## std::set_difference in C++

The difference of two sets is formed by the elements that are present in the first set, but not in the second one. The elements… Read More »

## std::set_intersection in C++

The intersection of two sets is formed only by the elements that are present in both sets. The elements copied by the function come always… Read More »

## std::bsearch in C++

Basics of Binary Search std::bsearch searches for an element in a sorted array. Finds an element equal to element pointed to by key in an… Read More »

## std::clamp in C++ 17

Clamps a variable to a given range[high – low]. If num > high, num is assigned high. If num < low, num is assigned low.… Read More »

## std::partial_sort_copy in C++

std::partial_sort is used for sorting the range within the entire container. So, if we want to keep the original container intact and just copy the… Read More »

## std::partial_sort in C++

std::sort is used for sorting the elements present within a container. One of the variants of this is std::partial_sort, which is used for sorting not… Read More »

## std::is_partitioned in C++

std::is_partitioned is used for finding whether the range[first, last) is partitioned or not. A range is said to be partitioned with respect to a condition… Read More »

## std::iter_swap in C++

std::swap is used for swapping of elements between two containers. One of the other way of doing this same thing is facilitated by std::iter_swap, which… Read More »

## equal_range in C++

std::equal_range is used to find the sub-range within a given range [first, last) that has all the elements equivalent to a given value. It returns… Read More »

## std::find_end in C++

std::find_end is used to find the last occurrence of a sub-sequence inside a container. It searches the range [first1,last1) for the last occurrence of the… Read More »

## std::find_first_of in C++

std::find_first_of is used to compare elements between two containers. It compares all the elements in a range [first1,last1) with the elements in the range [first2,last2),… Read More »

## std::unique_copy in C++

std::unique is used to remove duplicates of any element present consecutively in a range[first, last). It performs this task for all the sub-groups present in… Read More »

## std::unique in C++

std::unique is used to remove duplicates of any element present consecutively in a range[first, last). It performs this task for all the sub-groups present in… Read More »