## Find sub-arrays from given two arrays such that they have equal sum

Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from the… Read More »

- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find sub-arrays from given two arrays such that they have equal sum
- Remove minimum elements from array so that max <= 2 * min
- How to traverse a STL map in reverse direction?
- How to delete last element from a map in C++
- Find number of unique triangles among given N triangles
- Count of quadruplets with given Sum | Set 2
- Find the Number of Maximum Product Quadruples
- Check if frequency of characters are in Recaman Series
- map get_allocator in C++ STL

Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from the… Read More »

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

Given three arrays a[], b[] and c[] of N elements representing the three sides of N triangles. The task is to find the number of… Read More »

Given a string of lowercase alphabets. The task is to check whether the frequency of alphabets in this string, after arranging in any possible manner,… Read More »

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

map::get_allocator() is a built in function in C++ STL which is used to get allocator of container map. Syntax: Allocator_type get_allocator() Parameters: This function does… Read More »

Given an array of N positive elements find the number of quadruple, (i, j, k, m) such that i < j < k < m… Read More »

If we wish to delete the last element from a map, we can use following methods : using prev(mp.end()) : what prev function do is,… Read More »

Map stores the elements in sorted order of keys. Now if we want to traverse it in reverse order we will use reverse_iterator of map.… Read More »

Given an array arr, the task is to remove minimum number of elements such that after their removal, max(arr) <= 2 * min(arr). Examples: Input:… Read More »

A double ended priority queue supports operations of both max heap (a max priority queue) and min heap (a min priority queue). The following operations… Read More »

Given two arrays arr1[] and arr2[]. The task is to find the total number of distinct pairs(formed by picking 1 element from arr1 and one… Read More »

Given an unsorted array A[]. The task is to print all unique pairs in the unsorted array with equal sum. Note: Print the result in… Read More »

Given an array A[] of integers. The task is to print all indices of this array such that after removing the ith element from the… Read More »

Given two strings, the task is to check whether the frequencies of a character(for each character) in one string is a multiple or a factor… Read More »