## 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 »

- Sum of all Primes in a given range using Sieve of Eratosthenes
- Count the number of vowels occurring in all the substrings of given string
- Kth Smallest sum of continuous subarrays of positive numbers
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Replace every element of the array by sum of all other elements
- Maximum sum subarray such that start and end values are same
- Two equal sum segment range queries
- Product of all primes in the range from L to R
- Index with Minimum sum of prefix and suffix sums in an Array
- Partition an array such into maximum increasing segments
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Sum of first N natural numbers by taking powers of 2 as negative number
- Sum of all odd factors of numbers in the range [l, r]
- Partition the array into three equal sum segments
- Count number of indices such that s[i] = s[i+1] : Range queries
- Check if a large number can be divided into two or more segments of equal sum
- Minimum elements to change so that for an index i all elements on the left are -ve and all elements on the right are +ve
- Check if every index i has an index j such that sum of elements in both directions are equal
- Maximum occurred integer in n ranges | Set-2
- Sum of all even factors of numbers in the range [l, r]
- Check whether two strings can be made equal by increasing prefixes
- Check if a line at 45 degree can divide the plane into two equal weight parts
- Maximum sub-array sum after dividing array into sub-arrays based on the given queries
- Replace all elements by difference of sums of positive and negative numbers after that element

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »