## Max sum of M non-overlapping subarrays of size K

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 »

- Largest subarray having sum greater than k
- Kth Smallest sum of continuous subarrays of positive numbers
- Longest substring with count of 1s more than 0s
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Count the number of vowels occurring in all the substrings of given string
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Subarray whose absolute sum is closest to K
- Replace every element of the array by sum of all other elements
- Maximum sum subarray such that start and end values are same
- Product of all primes in the range from L to R
- Index with Minimum sum of prefix and suffix sums in an Array
- Sum of first N natural numbers by taking powers of 2 as negative number
- Longest subarray having average greater than or equal to x | Set-2
- Split array to three subarrays such that sum of first and third subarray is equal and maximum
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Partition an array such into maximum increasing segments
- Sum of all prime divisors of all the numbers in range L-R
- Check if every index i has an index j such that sum of elements in both directions are equal
- Count number of indices such that s[i] = s[i+1] : Range queries
- 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
- Sudo Placement[1.5] | Partition
- Check if a large number can be divided into two or more segments of equal sum
- Maximum occurred integer in n ranges | Set-2
- Check whether two strings can be made equal by increasing prefixes
- First element greater than or equal to X in prefix sum of N numbers using Binary Lifting
- Check if a line at 45 degree can divide the plane into two equal weight parts

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 »

Consider an array A of n integers. Determine if array A can be split into three consecutive parts such that sum of each part is… Read More »

Given an array arr[] of n integers. The task is to find the sum of product of each element with each element after it in… Read More »

Given N numbers and Q queries, every query consists of L and R, task is to find the number of such integers i (L<=i<R) such… Read More »

Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s… Read More »

Given an array of N integers. We need to find an index such that Frequency of Even numbers on its left side is equal to… Read More »

Given a string s, count special substrings in it. A Substring of S is said to be special if either of the following properties is… Read More »

Given a range find total such numbers in the the given range such that they have no repeated digits. For example: 12 has no repeated… Read More »

Given an Array of Integers and an Integer value k, find out k sub-arrays(may be overlapping) which have k maximum sums. Examples: Input : arr… Read More »