The find_by_order() is a built-in function of Ordered Set which is a Policy Based Data Structure in C++. Policy-based data structures are not part of… Read More

# Tag Archives: cpp-set

Given an integer N and two arrays A[][], representing the set of languages a person knows, and B[][], consisting of M pairs of friendships, the… Read More

Given a matrix mat[][] of dimensions N * M, and an integer K, the task is to find the maximum sum of any rectangle possible… Read More

Given two strings S1 and S2 of lengths M and N respectively, the task is to calculate the sum of the frequencies of the characters… Read More

Given two strings A and B, the task is to count the minimum number of operations required to construct the string B by following operations: … Read More

Given an array A[] consisting of positive integers, the task is to calculate the minimum possible deviation of the given arrayA[] after performing the following… Read More

Prerequisite: Vectors in C++ STL Vectors are known as dynamic arrays with the ability to resize themselves automatically when an element is inserted or deleted,… Read More

Given an array arr[] of size N, the task is to find the smallest positive integer K such that incrementing or decrementing each array element… Read More

Given an array arr[] of size N, the task is to make all array elements equal to 0 by replacing all elements of a subsequences… Read More

Given an array arr[] of size N, the task is for each array element is to find the nearest non-equal value present on its left… Read More

Given an undirected graph G with vertices numbered in the range [0, N] and an array Edges[][] consisting of M edges, the task is to… Read More

Given an array arr[] consisting of N positive integers, the task is to minimize the maximum difference between any pair of array elements by multiplying… Read More

Given two strings str1 and str2, the task is to check if a string str1 can be converted to string str2 by performing the following… Read More