## Mean of range in array

Given an array of n integers. You are given q queries. Write a program to print floor value of mean in range l to r… Read More »

## Print modified array after executing the commands of addition and subtraction

Given an array of size ‘n’ and a given set of commands of size ‘m’. Every command consist of four integers q, l, r, k.… Read More »

## Count of substrings of a binary string containing K ones

Given a binary string of length N and an integer K, we need to find out how many substrings of this string are exist which… Read More »

## Find an element in array such that sum of left array is equal to sum of right array

Given, an array of size n. Find an element which divides the array in two sub-arrays with equal sum. Examples: Input : 1 4 2… Read More »

## Minimum absolute difference of XOR values of two subarrays

Given an array containing n numbers. The problem is to split the array into two subarrays such that the absolute difference of the xor values… Read More »

## Count subarrays with equal number of occurrences of two given elements

Given an array and two integers say, x and y, find the number of subarrays in which the number of occurrences of x is equal… Read More »

## Print modified array after multiple array range increment operations

Given an array containing n integers and a value d. m queries are given. Each query has two values start and end. For each query,… Read More »

## Find the Sub-array with sum closest to 0

Given an array of both positive and negative numbers, the task is to find out the subarray whose sum is closest to 0. There can… Read More »

## Count the number of ways to divide an array into three contiguous parts having equal sum

Given a array of n numbers. Our task is to find out the number of ways to divide the array into three contiguous parts such… Read More »

## Maximum sum two non-overlapping subarrays of given size

Given an array, we need to find two subarrays with a specific length K such that sum of these subarrays is maximum among all possible… Read More »

## Prefix Sum Array – Implementation and Applications in Competitive Programming

Given an array arr[] of size n, its prefix sum array is another array prefixSum[] of same size such that the value of prefixSum[i] is… Read More »

## Minimum cost for acquiring all coins with k extra coins allowed with every coin

You are given a list of N coins of different denominations. you can pay an amount equivalent to any 1 coin and can acquire that… Read More »

## Maximum subarray sum modulo m

Given an array of n elements and an integer m. The task is to find the maximum value of the sum of its subarray modulo… Read More »

## Maximum occurred integer in n ranges

Given n ranges of the form L and R, the task is to find the maximum occurred integer in all the ranges. If more than… Read More »

## Maximum subarray size, such that all subarrays of that size have sum less than k

Given an array of n positive integers and a positive integer k, the task is to find the maximum subarray size such that all subarrays… Read More »