## Print the Maximum Subarray Sum

Given an array arr[], the task is to find the elements of a contiguous subarray of numbers which has the largest sum. Examples: Input: arr… Read More »

## Subarray with largest sum after excluding its maximum element

Given an array arr[], the task is to find the starting and ending indices of the subarray with the largest sum after excluding its maximum… Read More »

## Minimum possible sum of array elements after performing the given operation

Given an array arr[] of size N and a number X. If any sub array of the array(possibly empty) arr[i], arr[i+1], … can be replaced… Read More »

## Length of longest Subarray with equal number of odd and even elements

Given an integer array arr[], the task is to find the length of the longest subarray with an equal number of odd and even elements.… Read More »

## Maximum subsequence sum such that all elements are K distance apart

Given an array arr[] of N integers and another integer K. The task is to find the maximum sum of a subsequence such that the… Read More »

## Maximum sum contiguous nodes in the given linked list

Given a linked list, the task is to find the maximum sum for any contiguous nodes. Examples: Input: -2 -> -3 -> 4 -> -1… Read More »

## Maximize the subarray sum after multiplying all elements of any subarray with X

Given an array arr[] of N integers and an integer X. We can choose any sub-array and multiply all its element by X. After multiplication,… Read More »

## Maximum sum of all elements of array after performing given operations

Given an array of integers. The task is to find the maximum sum of all the elements of the array after performing the given two… Read More »

## Smallest sum contiguous subarray | Set-2

Given an array containing N integers. The task is to find the sum of the elements of the contiguous subarray having the smallest(minimum) sum. Examples:… Read More »

## Maximum difference of zeros and ones in binary string

Given a binary string of 0s and 1s. The task is to find the length of substring which is having maximum difference of number of… Read More »

## Maximize number of 0s by flipping a subarray

Given a binary array, find the maximum number zeros in an array with one flip of a subarray allowed. A flip operation switches all 0s… Read More »

## Maximum absolute difference between sum of two contiguous sub-arrays

Given an array of integers, find two non-overlapping contiguous sub-arrays such that the absolute difference between the sum of two sub-arrays is maximum. Example: Input:… Read More »