## Count number of ways to divide an array into two halves with same sum

Given an integer array of N elements. The task is to find the number of ways to split the array into two equal sum sub-arrays… Read More »

- Minimum value to add to arr[i] so that an array can be split at index i with equal sum
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Partition the array into three equal sum segments
- Count number of ways to divide an array into two halves with same sum
- Find the number of sub arrays in the permutation of first N natural numbers such that their median is M
- Two equal sum segment range queries
- Count the number of sub-arrays such that the average of elements present in the sub-array is greater than that not present in the sub-array
- Rearrange the array to maximize the number of primes in prefix sum of the array
- Number of subarrays having sum of the form k^m, m >= 0
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Sum of all odd factors of numbers in the range [l, r]
- Generate an Array in which count of even and odd sum sub-arrays are E and O respectively
- Sum of all even factors of numbers in the range [l, r]
- Queries to answer the number of ones and zero to the left of given index
- Count the number of primes in the prefix sum array of the given array
- Replace all elements by difference of sums of positive and negative numbers after that element
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
- Maximum sub-array sum after dividing array into sub-arrays based on the given queries

Given an integer array of N elements. The task is to find the number of ways to split the array into two equal sum sub-arrays… Read More »

Given an array arr[] of N positive integers and a non negative integer K. The task is to delete exactly K sub-arrays from the array… Read More »

Given an array arr[] of 1’s and 2’s, the task is to re-arrange the array in such a way that the prefix sum of the… Read More »

Given an array arr[] of N integers, the task is to count the number of primes in the prefix sum array of the given array.… Read More »

Given three integers N, E and O. The task is to find an array of size N such that the number of sub-arrays of sum… Read More »

Given an integer N. The task is to find the number of integers 1 < x < N, for which x and x + 1… Read More »

Given an array of integers arr[], the task is to count the number of sub-arrays such that the average of elements present in the sub-array… Read More »

Given an array arr[] containing the permutation of first N natural numbers and an integer M ≤ N. The task is to find the number… Read More »

Given a binary array and Q queries. Every query consists of a number K, the task is to print the number of ones and zeros… Read More »

Given an array arr[] of integers, the task is to find the minimum non-negative integer k such that there exists an index jin the given… Read More »

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

Given an array of n integers, we have to partition the array into three segments such that all the segments have equal sum. Segment sum… Read More »

Given an array of positive and negative elements. The task is to replace every i-th element of the array by the absolute difference of absolute… Read More »

Given a range [l, r], the task is to find the sum of all the even factors of the numbers from the given range. Examples:… Read More »

Given a range [l, r], the task is to find the sum of all the odd factors of the numbers from the given range. Examples:… Read More »