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

## is_permutation() in C++ and its application for anagram search

is_permutations() is used to check if two containers like string and vector are permutation of each other. It accepts three parameters, the first two parameters… Read More »

## How to store Data Triplet in a Vector in C++?

Given a vector, how can we store 3 elements in one cell of vector. Examples: Input : 2 5 10 3 6 15 Output :… Read More »

## How to transform Vector into String?

Vectors: Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being… Read More »

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

reverse() is a predefined function in header file algorithm. It is defined as a template in the above mentioned header file. It reverses the order… Read More »

## Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)

Binary search is an important component in competitive programming or any algorithmic competition, having knowledge of shorthand functions reduces the time to code them. This… Read More »

## Merge operations using STL in C++ | merge(), includes(), set_union(), set_intersection(), set_difference(), ., inplace_merge,

Some of the merge operation classes are provided in C++ STL under the header file “algorithm”, which facilitates several merge operations in a easy manner.… Read More »

## std::partition in C++ STL

C++ has a class in its STL algorithms library which allows us easy partition algorithms using certain inbuilt functions. Partition refers to act of dividing… Read More »

## Array algorithms in C++ STL (all_of, any_of, none_of, copy_n and iota)

From C++11 onwards, some new and interesting algorithms are added in STL of C++. These algorithms operate on an array and are useful in saving… Read More »

## Ways to copy a vector in C++

In case of arrays, there is no much choice to copy an array into other, other than iterative method i.e running a loop to copy… Read More »

## Algorithm Library | C++ Magicians STL Algorithm

For all those who aspire to excel in competitive programming, only having a knowledge about containers of STL is of less use till one is… Read More »

## Common Subtleties in  Vector STLs

Prerequisite – Vector Basics Following are some important points that can save time on little things in an interview or an important coding contest. vector… Read More »

## std::transform() in C++ STL (Perform an operation on all elements)

Consider the problem of adding contents of two arrays into a third array. It is given that all arrays are of same size. Following is… Read More »

## std::sort() in C++ STL

We have discussed qsort() in C. C++ STL provides a similar function sort that sorts a vector or array (items with random access). Below is… Read More »

## Sort in C++ Standard Template Library (STL)

Sorting is one of the most basic functions applied to data. It means arranging the data in a particular fashion, which can be increasing or… Read More »

## Binary Search in C++ Standard Template Library (STL)

Binary search is a widely used searching algorithm that requires the array to be sorted before search is applied. The main idea behind this algorithm… Read More »