## Median Of Running Stream of Numbers – (using Set)

Given that integers are being read from a data stream. Find the median of all the elements read so far starting from the first integer… Read More »

## Print numbers in descending order along with their frequencies

Given an array arr, the task is to print the elements of the array in descending order along with their frequencies. Examples: Input: arr[] =… Read More »

## Minimum number of elements to be replaced to make the given array a Fibonacci Sequence

Given an array arr containing N integer elements, the task is to count the minimum number of elements that need to be changed such that… Read More »

## Check if any permutation of N equals any power of K

Given a positive integer N and K where and . The task is to check whether any permutation of digits of N equals any power… Read More »

## multiset erase() in C++ STL

Prerequisite : multiset The multiset::erase() is the STL function in C++ removes the specified element from multiset. There are three versions of this method. These… Read More »

## multiset key_comp() function in C++ STL

The std::multiset::key_comp() is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container. By default, this is… Read More »

## multiset max_size() in C++ STL

The multiset::max_size() is an observer function in C++ STL which returns the maximum number of elements a container can hold. This limit might be due… Read More »

## multiset value_comp() method in C++ STL

The std::multiset::value_comp is an inbuilt function in C++ STL which returns a copy of the comparison object used by the container.By default, this is a… Read More »

## multiset get_allocator() function in C++ STL

The multiset::get_allocator() method in C++ STL is a built-in function in C++ STL which returns a copy of the allocator object associated with the multiset.… Read More »

## Maximum contiguous 1 possible in a binary string after k rotations

Given a binary string, you can rotate any substring of this string. For Example, let string be denoted by s. Let the first element of… Read More »

## Minimum number of increasing subsequences

Given an array of integers of size N, you have to divide it into the minimum number of “strictly increasing subsequences” For example: let the… Read More »

## Check if elements of an array can be arranged in a Circle with consecutive difference as 1

Given an array of numbers. The task is to check if it is possible to arrange all the numbers in a circle so that any… Read More »

## Multi-set for user defined data type

You are given Q queries. Each query contains an integer k and a person’s information i.e, first name, last name, age. For each query, we… Read More »

## Pair with minimum absolute difference after solving each query

Given Q queries and an empty list. The queries can be of two types: addToList(x) : Add x to your list. removeFromList(x) : Remove x… Read More »

## Minimum cost path from source node to destination node via an intermediate node

Given an undirected weighted graph. The task is to find the minimum cost of the path from source node to the destination node via an… Read More »