## Largest subarray having sum greater than k

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 »

## Longest substring with count of 1s more than 0s

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 »

## Sum of all prime divisors of all the numbers in range L-R

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 »

## Sudo Placement[1.5] | Partition

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 »

## Minimum positive integer required to split the array equally

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 »

## Queries for number of array elements in a range with Kth Bit Set

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 »

## Partitioning into two contiguous element subarrays with equal sums

Given an array of n positive integers. Find a minimum positive element to be added to one of the indexes in the array such that… Read More »

## Counting values greater than equal to x after increments

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

## Max sum of M non-overlapping subarrays of size K

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 »

## Maximum average sum partition of an array

Given an array, we partition a row of numbers A into at most K adjacent (non-empty) groups, then the score is the sum of the… Read More »

## Maximum equlibrium sum in an array

Given an array arr[]. Find maximum value of prefix sum which is also suffix sum for index i in arr[]. Examples : Input : arr[]… Read More »

## Prefix Sum of Matrix (Or 2D Array)

Given a matrix (or 2D array) a[][] of integers, find prefix sum matrix for it. Let prefix sum matrix be psa[][]. The value of psa[i][j]… Read More »

## Fibonacci sum of a subset with all elements <= k

Given an array of n elements, the task is to find the fibonacci sum of a subset of the array where every element of the… Read More »

## Number of prefix sum prime in given range query

Given an array of non-negative integers and range query l, r, find number of prefix sum which are prime numbers in that given range. Prerequisite… Read More »

## Check if it possible to partition in k subarrays with equal sum

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 »