## Count the number of ways to divide an array into three contiguous parts having equal sum

Given a array of n numbers. Our task is to find out the number of ways to divide the array into three contiguous parts such… 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
- Split array to three subarrays such that sum of first and third subarray is equal and maximum
- 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
- 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
- Check if a large number can be divided into two or more segments of equal sum
- Sudo Placement[1.5] | Partition
- 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 a array of n numbers. Our task is to find out the number of ways to divide the array into three contiguous parts such… 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 arr[] of size n, its prefix sum array is another array prefixSum[] of same size such that the value of prefixSum[i] is… Read More »

You are given a list of N coins of different denominations. you can pay an amount equivalent to any 1 coin and can acquire that… Read More »

Given an array of n elements and an integer m. The task is to find the maximum value of the sum of its subarray modulo… Read More »

Given n ranges of the form L and R, the task is to find the maximum occurred integer in all the ranges. If more than… 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 of limits. For every limit, find the prime number which can be written as the sum of the most consecutive primes smaller… 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 two binary arrays arr1[] and arr2[] of same size n. Find length of the longest common span (i, j) where j >= i such… Read More »

Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum. Examples : Input: {4,… Read More »

Given n numbers, each with some frequency of occurrence. Return a random number with probability proportional to its frequency of occurrence. Example: Let following be… Read More »

Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Expected time complexity is O(n).… Read More »

Equilibrium index of an array is an index such that the sum of elements at lower indexes is equal to the sum of elements at… Read More »