## Check if a large number can be divided into two or more segments of equal sum

Given a very large Number N. The task is to check if the number can be divided into two or more segments of an equal… 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
- Rearrange the array to maximize the number of primes in prefix sum of the array
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- 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
- Number of subarrays having sum of the form k^m, m >= 0
- 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 a very large Number N. The task is to check if the number can be divided into two or more segments of an equal… Read More »

Given N ranges of L-R. The task is to print the number which occurs the maximum number of times in the given ranges. Note: 1… Read More »

Given a circular array of size N. The task is to check if, for every index i starting from 0 to N-1, there exists an… Read More »

Given a set of n points (xi, yi) in 2D coordinate. Each point has some weight wi. The task is to check whether a line… Read More »

Given an array of size N, the task is to find the encrypted array. The encrypted array is obtained by replacing each element of the… Read More »

Given an array of N integers. The task is to find the longest contiguous subarray so that the average of its elements is greater than… Read More »

Given an array of n elements and an integer K, the task is to find the subarray with minimum value of ||a[i] + a[i +… Read More »

Given an array of N integers, the task is to print the sum of the first subarray by splitting the array into exactly three subarrays… Read More »

Given an array of N integers and a number X. The task is to find the index of first element which is greater than or… Read More »

Given an array of integers and a value k, find length of largest subarray having sum greater than k. Examples: Input : arr[] = {-2,… Read More »

Given a binary string find the longest substring which contains 1’s more than 0’s. Examples: Input : 1010 Output : 3 Substring 101 has 1… Read More »

Given two integers L and R. The task is to find the sum of all prime factors of every number in the range[L-R]. Examples: Input:… Read More »

Given an array of positive and negative numbers. The task is to find a partition point such that none of the elements of left array… 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 N positive (32-bit)integers, the task is to answer Q queries of the following form: Query(L, R, K): Print the number of… Read More »