## Smallest number to be added in first Array modulo M to make frequencies of both Arrays equal

Given two arrays A[] and B[] consisting of N positive integers and a integer M, the task is to find the minimum value of X… Read More »

- How to find the Entry with largest Value in a C++ Map
- Sorting a Map by value in C++ STL
- Longest permutation subsequence in a given array
- Remove odd frequency characters from the string
- Count of substrings of length K with exactly K distinct characters
- Program to find frequency of each element in a vector using map in C++
- Count of elements A[i] such that A[i] + 1 is also present in the Array
- Calculate the frequency of each word in the given string
- Count of greater elements for each element in the Array
- How to iterate through a Vector without using Iterators in C++
- Minimum and Maximum of all subarrays of size K using Map
- Minimum distance between any two equal elements in an Array
- Maximum sum subsequence with values differing by at least 2
- Sort an array in descending order based on the sum of its occurrence
- Maximum element in an array which is equal to its frequency
- Count of multiples in an Array before every element
- Check if the given permutation is a valid BFS of a given Tree
- Split an array containing N elements into K sets of distinct elements
- Total length of string from given Array of strings composed using given characters
- Implementation of lower_bound() and upper_bound() on Map of Pairs in C++
- Check if given permutation of 1 to N is feasible using given operations
- Count of intersections of M line segments with N vertical lines in XY plane

Given two arrays A[] and B[] consisting of N positive integers and a integer M, the task is to find the minimum value of X… Read More »

Given an array arr[] of size N, and Q queries of the form {i, k} for which, the task is to print the most frequent… Read More »

Given an array arr[] of length N, the task is to print the number of array elements which cannot form a pair with any other… Read More »

Given an integer array arr[] and Q queries, the task is to find the sum of the array for each query of the following type:… Read More »

Given two arrays arr1[] and arr2[] consisting of strings, the task is to print the count of anagrams of every string in arr2[] that are… Read More »

Given a very large number N in form of string and a number K, the task is to print all the K-digit repeating numbers whose… Read More »

Given an array arr[], the task is to determine the number of elements of the array which are not divisible by any other element in… Read More »

Given an array of integers arr[] of size N, the task is to count all the elements of the array which have a frequency equals… Read More »

Given x coordinates of N vertical lines (parallel to Y-axis) and M line segments extending from (x1, y1) to (x2, y2), the task is to… Read More »

Given a string str of lowercase alphabets and an integer K, the task is to count all substrings of length K which have exactly K… Read More »

Given a tree with N nodes numbered from 1 to N and an permutation array of numbers from 1 to N. Check if it is… Read More »

Given two integers N and K and an array arr[] consisting of duplicate elements, the task is to split N elements into K sets of… Read More »

Given an array arr[] of size N, the task to check if this array is build under following constraints: The array can only contain numbers… Read More »

Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values… Read More »

Prerequisite: C++ STL, Iterators in C++ STL The iterator is not the only way to iterate through any STL container. There exists a better and… Read More »