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 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 integer k and an array arr[], the task is to count the number of sub-arrays that have the sum equal to some positive integral power of k.Examples:...
Given an integer K and an array A[] of size N, the task is to create a new array with sum K with minimum number of operations, where in each operation, an element can be removed either from the start or end of A[] and appended to the new array. If it is not possible to generate a new array with sum K, print -1. If there are multiple answers, print any one of them....
Given an array arr of size N and an integer K, the task is to find the maximum sum subarray of size k among all contiguous sub-array (considering circular subarray also)....
Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative and positive numbers....
Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative and positive numbers....