## Maximum sum subarray of even length

Given an array arr[] of N elements, the task is to find the maximum sum of any subarray of length X such that X >… Read More »

- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Greatest contiguous sub-array of size K
- Find a subarray whose sum is divisible by size of the array
- Number of ways to divide an array into K equal sum sub-arrays
- Maximum subsequence sum such that all elements are K distance apart
- Maximum sum of non-overlapping subarrays of length atmost K
- Queries for number of distinct elements in a subarray | Set 2
- Count of triplets that satisfy the given equation
- Find subarray with given sum with negatives allowed in constant space
- Find minimum length sub-array which has given sub-sequence in it
- Divide an array into K subarray with the given condition
- Maximum length sub-array which satisfies the given conditions
- Find array such that no subarray has xor zero or Y
- Sum of XOR of all sub-arrays of length K
- Longest Subarray having strictly positive XOR
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Find all unique pairs of maximum and second maximum elements over all sub-arrays in O(NlogN)
- Maximum possible sub-array sum after at most X swaps
- Number of Subarrays with positive product
- Bitwise AND of sub-array closest to K
- Length of longest sub-array with maximum arithmetic mean.
- Longest sub-array with equal number of alphabets and numeric characters
- Number of sub arrays with negative product
- Count number of permutation of an Array having no SubArray of size two or more from original Array
- Maximise array sum after taking non-overlapping sub-arrays of length K
- Maximum length sub-array which satisfies the given conditions
- Number of triplets in array having subarray xor equal
- Find number of subarrays with XOR value a power of 2
- Minimum length subarray of 1s in a Binary Array
- Maximum sum after K consecutive deletions

Given an array arr[] of N elements, the task is to find the maximum sum of any subarray of length X such that X >… Read More »

Given an array arr[], the task is to find the smallest sub-arrays with GCD equal to 1. If there is no such sub-array then print… Read More »

Given an array arr[], the task is to find the number of sub-arrays with GCD value equal to 1. Examples: Input: arr[] = {1, 1,… Read More »

Given an array arr[] of N elements and an integer K, the task is to find the number of non-decreasing sub-arrays of length less than… Read More »

Given an array arr[] of N elements and an integer K, the task is to find the number of non-decreasing sub-arrays of length greater than… Read More »

Given an array arr[] of length N, the task is to find the number of non-decreasing sub-arrays of length K. Examples: Input: arr[] = {1,… Read More »

Given an array arr[] of N integers and a positive integer K, the task is to minimize the sum of the array elements after performing… Read More »

A sequence of integers is said to be UpDown, if the inequality holds true. You are given a sequence . You can insert at most… Read More »

Given an array arr. The task is to divide the array into the minimum number of subarrays containing unique elements and return the count of… Read More »

Given an array arr[] of N integers, the task is to find the maximum length of any sub-array of arr[] which satisfies one of the… Read More »

Given an array arr[] and an integer K. The task is to divide the array into K parts ( subarray ) such that the sum… Read More »

Given an array of integers Arr. The task is to count the number of triplets (i, j, k) such that Ai ^ Ai+1 ^ Ai+2… Read More »

Given an array arr[] of N integers, the task is to find the count of subarrays with positive product. Examples: Input: arr[] = {-1, 2,… Read More »

Given an unsorted array of integers, find a subarray which adds to a given number. If there are more than one subarrays with the sum… Read More »

Given an integer array, arr[] of size N. The XOR value of any subarray of arr[] is defined as the xor of all the integers… Read More »