Kadane's Algorithm for largest subarray sum

Kadane's Algorithm is commonly known for Finding the largest sum of a subarray in linear time O(N).


A Subarray of an n-element array is an array composed from a contiguous block of the original array's elements. For example, if array = [1,2,3] then the subarrays are [1], [2], [3], [1,2], [2,3] and [1,2,3] . Something like [1,3] would not be a subarray as it's not a contiguous subsection of the original array.


Difference between Subarray, Substring, Subset and Subsequence
1. SUBARRAY

A subar...

 •  0 comments  •  flag
Share on Twitter
Published on May 31, 2020 10:27
No comments have been added yet.