Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum....
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :...
Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum....
An array is given, find length of the subarray having maximum sum....
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :...
Given n numbers (both +ve and -ve), arranged in a circle, find the maximum sum of consecutive numbers....
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types:...
Given an array A[] of size N, the task is to find the total number of positions in all the subarrays such that the value and position are the same....
Given three integer N, K and X, the task is to create an array of length N such that sum of all its K-length subarrays modulo N is X.Examples:...
Given an array arr[] of size N and an integer K, the task is to find the length of the longest subarray having Bitwise XOR of all its elements equal to K....
Given an array arr[] of positive integers and a number K, the task is to find the minimum and maximum values of Bitwise operation on elements of subarray of size K....
Given an array arr[] containing integers. The task is to find the number of decreasing subarrays with a difference of 1....