Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Algorithms
2.0K+ articles
Searching
1.7K+ articles
Dynamic Programming
1.6K+ articles
subarray
658+ articles
subarray-sum
192+ articles
Kadane
25 posts
Recent Articles
Popular Articles
Print subarray with maximum sum
Last Updated: 11 September 2024
Given an array arr[], the task is to print the subarray having maximum sum.Examples:Input:arr[] = {2, 3, -8, 7, -1, 2, 3}Output:11Explanation:The subarray {7, -1, 2, 3} ha...
read more
Dynamic Programming
DSA
Arrays
subarray
Arrays
Algorithms-Dynamic Programming
Kadane
subarray-sum
Maximum Subarray Sum possible by replacing an Array element by its Square
Last Updated: 14 April 2023
Given an array a[] consisting of N integers, the task is to find the maximum subarray sum that can be obtained by replacing a single array element by its square.Examples:I...
read more
Dynamic Programming
Searching
Mathematical
Competitive Programming
DSA
Arrays
Kadane
Memoization
subarray-sum
Maximize sum of an Array by flipping sign of all elements of a single subarray
Last Updated: 04 January 2023
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 of any subarray of the given array at most once...
read more
Dynamic Programming
Mathematical
Competitive Programming
DSA
Arrays
subarray
Kadane
subarray-sum
subarray-sumsubarray
Length of longest subarray with product equal to a power of 2
Last Updated: 14 October 2023
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 of that subarray equal to a per...
read more
Dynamic Programming
Searching
Mathematical
DSA
Arrays
subarray
Kadane
maths-power
Maximum subarray sum possible after removing at most K array elements
Last Updated: 11 April 2023
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 elements from the array.Examples:Input: arr[] = { -2, 1...
read more
Algorithms
Dynamic Programming
DSA
Arrays
Algorithms-Dynamic Programming
Kadane
subarray-sum
Maximize product of a strictly increasing or decreasing subarray
Last Updated: 11 July 2022
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 decreasing order.Examples:Input:...
read more
Misc
Searching
Mathematical
DSA
Arrays
subarray
Kadane
Count maximum number of cars parked at the same time
Last Updated: 22 May 2022
Given a 2d array arr[][] with each row representing a pair representing entry and exit time of a car in a parking lot, the task is to calculate the maximum number of cars ...
read more
Mathematical
Technical Scripter
DSA
Arrays
Kadane
Print all strings corresponding to elements in a subarray with maximum absolute sum
Last Updated: 14 September 2021
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 find the maximum absolute sum sub...
read more
Technical Scripter
Technical Scripter 2020
DSA
Arrays
subarray
Kadane
Maximum subarray sum possible after removing at most one subarray
Last Updated: 28 July 2022
Given an array arr[] consisting of N integers, the task is to find the maximum sum of any subarray possible after removing at most one subarray from the given array.Exampl...
read more
Algorithms
Dynamic Programming
Internship
CS – Placements
Java Programs
DSA
Arrays
array-rearrange
subarray
Kadane
subarray-sum
Experiences
Maximize product of subarray sum with its maximum element
Last Updated: 07 July 2021
Given an array arr[] consisting of N positive integers, the task is to find the maximum product of the subarray sum with the maximum element of that subarray.Examples:Inpu...
read more
GBlog
Algorithms
Mathematical
DSA
Arrays
subarray
Kadane
subarray-sum
Find minimum subarray sum for each index i in subarray [i, N-1]
Last Updated: 29 December 2022
Given an array arr[] of size N, the task is to find the minimum subarray sum in the subarrays [i, N-1] for all i in [0, N-1].Examples:Input: arr[ ] = {3, -1, -2}Output: -3...
read more
DSA
Arrays
subarray
Kadane
subarray-sum
Maximize sum by selecting contiguous elements from each row or column
Last Updated: 30 November 2022
Given a matrix mat[][] of size M x N where mat[i][j], the task is to find the maximum possible sum by picking contiguous elements from each or from each column.Note: It is...
read more
Greedy
Matrix
Technical Scripter
Technical Scripter 2022
DSA
Kadane
subarray-sum
Maximum Subarray sum of A[] by adding any element of B[] at any end
Last Updated: 17 April 2024
Given two arrays A[] and B[] having lengths N and M respectively, Where A[] and B[] can contain both positive and negative elements, the task is to find the maximum sub-ar...
read more
Technical Scripter
Technical Scripter 2022
DSA
Arrays
Kadane
subarray-sum
Maximum Subarray Sum of Alternate Parity
Last Updated: 18 January 2024
Given array A[] of size N. The Task for this problem is to find the maximum subarray (Subarrays are arrays within another array. Subarrays contain contiguous elements) sum...
read more
Geeks Premier League
DSA
Arrays
Kadane
Geeks Premier League 2023
3D Kadane's Algorithm
Last Updated: 01 March 2024
What is Kadane's Algorithm?Kadane's algorithm is a dynamic programming technique used to find the maximum subarray sum within a one-dimensional array. It efficiently compu...
read more
Matrix
Competitive Programming
Picked
Geeks Premier League
DSA
Kadane
Geeks Premier League 2023
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !