Javascript Program for Largest Sum Contiguous Subarray
Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum....
read more
Javascript Program For Finding Subarray With Given Sum – Set 1 (Nonnegative Numbers)
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :...
read more
Javascript Program to Find if there is a subarray with 0 sum
Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum....
read more
Javascript Program for Size of The Subarray With Maximum Sum
An array is given, find length of the subarray having maximum sum....
read more
Php Program For Finding Subarray With Given Sum – Set 1 (Nonnegative Numbers)
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples :...
read more
Javascript Program for Maximum circular subarray sum
Given n numbers (both +ve and -ve), arranged in a circle, find the maximum sum of consecutive numbers....
read more
Javascript Program for Queries to find maximum sum contiguous subarrays of given length in a rotating array
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types:...
read more
Find total number of positions in all Subarrays such that position and value are same
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....
read more
Generate Array whose sum of all K-size subarrays divided by N leaves remainder X
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:...
read more
Length of the longest subarray whose Bitwise XOR is K
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....
read more
Bitwise operations on Subarrays of size 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....
read more
Count Subarrays with strictly decreasing consecutive elements
Given an array arr[] containing integers. The task is to find the number of decreasing subarrays with a difference of 1....
read more