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

- Length of the longest Subarray with only Even Elements
- Maximum Product Subarray | Set 3
- Check whether an Array is Subarray of another Array
- Longest Subarray with Sum greater than Equal to Zero
- Smallest Integer to be inserted to have equal sums
- Number of subarrays with odd sum
- Length of largest sub-array having primes strictly greater than non-primes
- Sum of minimum elements of all subarrays
- Subarray of size k with given sum
- Generating subarrays using recursion
- Smallest subarray such that all elements are greater than K
- Subarray whose absolute sum is closest to K
- Maximize the number of subarrays with XOR as zero
- Element which occurs consecutively in a given subarray more than or equal to K times
- Sort an array where a subarray of a sorted array is in reverse order
- Longest Prime Subarray after removing one element
- Check if subarray with given product exists in an array
- Smallest sum contiguous subarray | Set-2
- Find the count of Strictly decreasing Subarrays
- Count subarrays with all elements greater than K
- Largest sub-array whose all elements are perfect squares
- Find an element which divides the array in two subarrays with equal product
- Check if all sub-numbers have distinct Digit product
- Number of sub-arrays that have at least one duplicate
- Longest subarray with elements divisible by k
- Count subarrays with Prime sum
- Longest subarray having difference in the count of 1's and 0's equal to k
- Maximum sum subarray such that start and end values are same
- Maximum number of contiguous array elements with same number of set bits
- Minimum positive integer required to split the array equally

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 and limits (lower and upper limits), check the sum of the subarray in the given limit is prime or not Examples :… Read More »

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… 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 »

Given an array of N integers, count number of even-odd subarrays. An even – odd subarray is a subarray that contains the same number of… Read More »

Given an array of n integers, find the no of subarrays whose minimal and maximum elements are same. Subarray is defined as non-empty sequence of… Read More »

Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative… Read More »

Given a Array of positive numbers, calculate the number of possible subarrays having product greater than a given number K. Examples: Input : arr[] =… Read More »

Given a array of n numbers. We need to count the number of subarrays having the product and sum of elements are equal Examples: Input… 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 of integers greater than zero, find if it is possible to split it in two subarrays (without reordering the elements), such that… Read More »

Given an array of integers, we need to get total XOR of all subarray XORs where subarray XOR can be obtained by XORing all elements… Read More »

You are given an array of positive and/or negative integers and a value K . The task is to find count of all sub-arrays whose… 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 »

Given an array, the task is to calculate the sum of lengths of contiguous subarrays having all elements distinct. Examples: Input : arr[] = {1,… Read More »