Given an array arr[] consisting of N pairs, each consisting of a string and an integer value corresponding to that string. The task is to… Read More

# Tag Archives: Kadane

Given an array arr[] of size N, the task is to find the maximum product from any subarray consisting of elements in strictly increasing or… Read More

Given an array arr[] of size N and an integer K, the task is to find the maximum subarray sum by removing at most K… Read More

Given an array arr[] consisting of N positive integers, the task is to find the length of the longest subarray having a product of elements… Read More

Given an array arr[] of N integers, the task is to find the maximum sum of the array that can be obtained by flipping signs… Read More

Given an array a[] consisting of N integers, the task is to find the maximum subarray sum that can be pbtained by replacing a single… Read More

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

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

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

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

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

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

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

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

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

What’s New

Most visited in Kadane

- Maximize sum of an Array by flipping sign of all elements of a single subarray
- Smallest sum contiguous subarray | Set-2
- Print all strings corresponding to elements in a subarray with maximum absolute sum
- Maximize the subarray sum after multiplying all elements of any subarray with X
- Maximum subsequence sum such that all elements are K distance apart