## <algorithms> library in C++ STL

Non-modifying sequence operations std :: all_of : Test condition on all elements in range std :: any_of : Test if any element in range fulfills… Read More »

Non-modifying sequence operations std :: all_of : Test condition on all elements in range std :: any_of : Test if any element in range fulfills… Read More »

std::next_permutation It is used to rearrange the elements in the range [first, last) into the next lexicographically greater permutation. A permutation is each one of… Read More »

partition_point() Gets the partition point : Returns an iterator to the first element in the partitioned range [first, last) for which pred(predicate) is not true,… Read More »

The sort_heap( ) is an STL algorithm which sorts a heap within the range specified by start and end. Sorts the elements in the heap… Read More »

The stable_partition( ) algorithm arranges the sequence defined by start and end such that all elements for which the predicate specified by pfn returns true… Read More »

random_shuffle It randomly rearrange elements in range [first, last). The function swaps the value of each element with some other randomly picked element. When provided,… Read More »

Returns true if pred returns false for all the elements in the range [first, last] or if the range is empty, and false otherwise. Syntax… Read More »

C++ offers in its STL library a merge() which is quite useful to merge sort two containers into a single container. It is defined in… Read More »

C++ defines a function which can be used to recognise if all the numbers in a container, also exists in other container. This task can… Read More »

Symmetric difference of two sorted ranges The symmetric difference of two sets is formed by the elements that are present in one of the sets,… Read More »

C++ STL offer many utilities to solve basic common life problems. Comparing values are always necessary, but sometimes we need to compare the strings also.… Read More »

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 »

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 »

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 »

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 »