## Largest subarray having sum greater than k

Given an array of integers and a value k, find length of largest subarray having sum greater than k. Examples: Input : arr[] = {-2,… 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
- Partition the array into three equal sum segments
- Sum of first N natural numbers by taking powers of 2 as negative number
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Sum of all odd factors of numbers in the range [l, r]
- Minimum value to add to arr[i] so that an array can be split at index i with equal sum
- 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
- Number of subarrays having sum of the form k^m, m >= 0
- 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 integers and a value k, find length of largest subarray having sum greater than k. Examples: Input : arr[] = {-2,… Read More »

Given a binary string find the longest substring which contains 1’s more than 0’s. Examples: Input : 1010 Output : 3 Substring 101 has 1… Read More »

Given two integers L and R. The task is to find the sum of all prime factors of every number in the range[L-R]. Examples: Input:… Read More »

Given an array of positive and negative numbers. The task is to find a partition point such that none of the elements of left array… Read More »

Given an array of N positive integers, the task is to find the smallest positive integer that can be placed between any two elements of… Read More »

Given an array of N positive (32-bit)integers, the task is to answer Q queries of the following form: Query(L, R, K): Print the number of… Read More »

Given an array of n positive integers. Find a minimum positive element to be added to one of the indexes in the array such that… Read More »

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

Given an array and two numbers M and K. We need to find sum of max M subarrays of size K (non-overlapping) in the array.… Read More »

Given an array, we partition a row of numbers A into at most K adjacent (non-empty) groups, then the score is the sum of the… Read More »

Given an array arr[]. Find maximum value of prefix sum which is also suffix sum for index i in arr[]. Examples : Input : arr[]… Read More »

Given a matrix (or 2D array) a[][] of integers, find prefix sum matrix for it. Let prefix sum matrix be psa[][]. The value of psa[i][j]… Read More »

Given an array of n elements, the task is to find the fibonacci sum of a subset of the array where every element of the… Read More »

Given an array of non-negative integers and range query l, r, find number of prefix sum which are prime numbers in that given range. Prerequisite… Read More »

Given an array A of size N, and a number K. Task is to find out if it is possible to partition the array A… Read More »