## Number of subarrays with odd sum

Given an array, find the number of subarrays whose sum is odd. Examples: Input : arr[] = {5, 4, 4, 5, 1, 3} Output :… Read More »

- Check whether an Array is Subarray of another Array
- Sum of minimum elements of all subarrays
- Length of the longest Subarray with only Even Elements
- Length of the longest alternating subarray
- Count pairs in array whose sum is divisible by K
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Maximum length of the sub-array whose first and last elements are same
- Count sub-arrays whose product is divisible by k
- Find the longest Fibonacci-like subarray of the given array
- Count subarrays with all elements greater than K
- Smallest Integer to be inserted to have equal sums
- Smallest subarray such that all elements are greater than K
- Count subarrays with Prime sum
- Maximum average of a subarray of size of atleast X and atmost Y
- Maximum sum subarray such that start and end values are same
- Longest subarray with elements divisible by k
- Number of sub-arrays that have at least one duplicate
- Sum of minimum element of all subarrays of a sorted array
- Maximize the number of subarrays with XOR as zero
- Find the number of sub arrays in the permutation of first N natural numbers such that their median is M
- Maximize the maximum among minimum of K consecutive sub-arrays
- Largest sub-array whose all elements are perfect squares
- Count Subarrays with Consecutive elements differing by 1
- Range Queries to Find number of sub-arrays with a given xor
- Minimum LCM and GCD possible among all possible sub-arrays
- Maximum size of sub-array that satisfies the given condition
- Find the count of Strictly decreasing Subarrays
- Maximum Subarray Sum after inverting at most two elements
- Count the number of non-increasing subarrays

Given an array, find the number of subarrays whose sum is odd. Examples: Input : arr[] = {5, 4, 4, 5, 1, 3} Output :… Read More »

Given an array containing N integers. The task is to find the sum of the elements of the contiguous subarray having the smallest(minimum) sum. Examples:… Read More »

Given an array of N numbers where a subarray is sorted in descending order and rest of the numbers in the array are in ascending… Read More »

Given an array of size N and Q queries, each query consists of L, R, and K(consider 1 based-indexing for L and R). The task… 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 size N. Find an element which divides the array into two sub-arrays with equal product. Print -1 if no such partition… Read More »

Given an array A[] that contains both positive and negative integers, find the maximum product subarray. Examples : Input: A[] = { 6, -3, -10,… 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 of n-positive elements. Sub-array sum is defined as the sum of all elements of a particular sub-array, the task is to find… 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 »